Add snooze support for calendar reminders (toast UI, service, DB) (#825)

* Filter reminder snooze options by default reminder

* Some updates.

* Fixing empty welcome page issue and attendee loading.

* Icon system for notifications and snooze options etc.
This commit is contained in:
Burak Kaan Köse
2026-03-04 00:12:52 +01:00
committed by GitHub
parent e816e87f61
commit 5b3739c6cf
85 changed files with 486 additions and 27 deletions
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Wino.Core.Domain;
public static class CalendarReminderSnoozeOptions
{
private static readonly int[] SupportedSnoozeMinutes = [5, 10, 15, 30];
public static IReadOnlyList<int> GetSupportedSnoozeMinutes()
=> SupportedSnoozeMinutes;
public static IReadOnlyList<int> GetAllowedSnoozeMinutes(long reminderDurationInSeconds, long defaultReminderDurationInSeconds)
{
var reminderMinutes = (int)Math.Max(0, reminderDurationInSeconds / 60);
if (reminderMinutes <= 0)
return [];
var maxSnoozeMinutes = reminderMinutes;
var defaultReminderMinutes = (int)Math.Max(0, defaultReminderDurationInSeconds / 60);
if (defaultReminderMinutes > 0)
maxSnoozeMinutes = Math.Min(maxSnoozeMinutes, defaultReminderMinutes);
return SupportedSnoozeMinutes.Where(minutes => minutes <= maxSnoozeMinutes).ToArray();
}
}