d11f0e46c0
clean up and fixes - Heute gefixt - Code Cleanup NotificationScheduleItemViewModel -fixed NotificationScheduleItemViewModel for Windows compat push implementation Push fixes Push benachrichtungen eingebaut - Status bei push - Push auch in background - Toggle für symtome angepasst push system change exporter update Optionen fix - Optionen aufgeteilt auf 3 tabs - Anpassungen haben jetzt Farbslider Optimierung fix
24 lines
817 B
C#
24 lines
817 B
C#
using cfs_tracker.Models;
|
|
|
|
namespace cfs_tracker.Helpers;
|
|
|
|
public static class NotificationWeekdayHelper
|
|
{
|
|
public static NotificationWeekdays ToFlag(DayOfWeek day) => day switch
|
|
{
|
|
DayOfWeek.Monday => NotificationWeekdays.Monday,
|
|
DayOfWeek.Tuesday => NotificationWeekdays.Tuesday,
|
|
DayOfWeek.Wednesday => NotificationWeekdays.Wednesday,
|
|
DayOfWeek.Thursday => NotificationWeekdays.Thursday,
|
|
DayOfWeek.Friday => NotificationWeekdays.Friday,
|
|
DayOfWeek.Saturday => NotificationWeekdays.Saturday,
|
|
DayOfWeek.Sunday => NotificationWeekdays.Sunday,
|
|
_ => NotificationWeekdays.None
|
|
};
|
|
|
|
public static bool ContainsDay(int mask, DayOfWeek day)
|
|
{
|
|
var flags = (NotificationWeekdays)mask;
|
|
return (flags & ToFlag(day)) != 0;
|
|
}
|
|
} |