fixed stupid init bug

This commit is contained in:
Daniel Schick 2025-01-13 17:35:35 +01:00
parent 654518e642
commit 753d8a4465

View File

@ -78,11 +78,14 @@ namespace BreCalClient
{
_notifications.Clear();
// load notification ids that have been processed
foreach (string? notification_id in Properties.Settings.Default.Notifications)
if (Properties.Settings.Default.Notifications != null)
{
if(Int32.TryParse(notification_id, out int result))
_notifications.Add(result, new AppNotification(result));
// load notification ids that have been processed
foreach (string? notification_id in Properties.Settings.Default.Notifications)
{
if (Int32.TryParse(notification_id, out int result))
_notifications.Add(result, new AppNotification(result));
}
}
}