Snooze notifications, morning summary, ICS import, data folder sync
- Windows toast notifications with snooze (10 min / 1 h / tomorrow) and done buttons; balloon fallback; works when Windows starts the app - Recurring entries snooze via SnoozedUntil without moving their date; lead reminders keep the real date - Morning summary once a day from a chosen hour (pure DailySummary) - iCalendar import incl. Google birthday calendar, folded lines, UTC, alarms, own export round trip, duplicates skipped by UID, undo - Data folder selectable (location.json pointer), file watcher reloads changes from another PC (own writes ignored) - Themed date picker calendar, WPF tray menu, arrow/Home/End/Space keys - 90 tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
18
App.xaml.cs
18
App.xaml.cs
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
@@ -30,10 +30,18 @@ namespace ReminderOrganizer
|
||||
SetupExceptionHandling();
|
||||
ServiceLocator.Initialize();
|
||||
|
||||
// Buttons in Windows notifications (snooze / done / open) – also when Windows started us for it.
|
||||
Microsoft.Toolkit.Uwp.Notifications.ToastNotificationManagerCompat.OnActivated += args =>
|
||||
{
|
||||
var toastArgs = Microsoft.Toolkit.Uwp.Notifications.ToastArguments.Parse(args.Argument);
|
||||
Current.Dispatcher.BeginInvoke(new Action(() => (Current.MainWindow as MainWindow)?.HandleToast(toastArgs)));
|
||||
};
|
||||
bool fromToast = Microsoft.Toolkit.Uwp.Notifications.ToastNotificationManagerCompat.WasCurrentProcessToastActivated();
|
||||
|
||||
var main = new MainWindow();
|
||||
MainWindow = main;
|
||||
// Autostart passes --minimized: start straight into the tray.
|
||||
if (Array.IndexOf(e.Args, "--minimized") >= 0)
|
||||
// Autostart passes --minimized: start straight into the tray. A toast button decides itself.
|
||||
if (Array.IndexOf(e.Args, "--minimized") >= 0 || fromToast)
|
||||
main.StartHidden();
|
||||
else
|
||||
main.Show();
|
||||
@@ -84,8 +92,8 @@ namespace ReminderOrganizer
|
||||
{
|
||||
try
|
||||
{
|
||||
Directory.CreateDirectory(DataService.DefaultDataDirectory);
|
||||
var logPath = Path.Combine(DataService.DefaultDataDirectory, "error.log");
|
||||
Directory.CreateDirectory(DataService.AppDirectory);
|
||||
var logPath = Path.Combine(DataService.AppDirectory, "error.log");
|
||||
var logEntry = $"[{DateTime.Now:yyyy-MM-dd HH:mm:ss}] [{source}]\n{ex}\n\n";
|
||||
File.AppendAllText(logPath, logEntry);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user