do not show notifications again on the client
This commit is contained in:
parent
5eb1074a79
commit
1f860baa2b
@ -8,6 +8,7 @@ using System.Collections.Generic;
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using ToastNotifications.Core;
|
using ToastNotifications.Core;
|
||||||
using BreCalClient.misc.Model;
|
using BreCalClient.misc.Model;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace BreCalClient
|
namespace BreCalClient
|
||||||
{
|
{
|
||||||
@ -165,14 +166,22 @@ namespace BreCalClient
|
|||||||
{
|
{
|
||||||
vm.ShowAppNotification(toastText, options);
|
vm.ShowAppNotification(toastText, options);
|
||||||
});
|
});
|
||||||
|
result = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (result)
|
||||||
|
SaveNotifications(); // store notification ids in config array on change
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void SaveNotifications()
|
internal static void SaveNotifications()
|
||||||
{
|
{
|
||||||
|
if (Properties.Settings.Default.Notifications == null)
|
||||||
|
Properties.Settings.Default.Notifications = new();
|
||||||
|
else
|
||||||
Properties.Settings.Default.Notifications.Clear();
|
Properties.Settings.Default.Notifications.Clear();
|
||||||
foreach (int notification_id in _notifications.Keys)
|
foreach (int notification_id in _notifications.Keys)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -152,6 +152,7 @@ namespace BreCalClient
|
|||||||
};
|
};
|
||||||
this.comboBoxSortOrder.ItemsSource = Enum.GetValues(typeof(Extensions.SortOrder));
|
this.comboBoxSortOrder.ItemsSource = Enum.GetValues(typeof(Extensions.SortOrder));
|
||||||
this.comboBoxSortOrder.SelectedIndex = (int)_sortOrder;
|
this.comboBoxSortOrder.SelectedIndex = (int)_sortOrder;
|
||||||
|
AppNotification.LoadFromSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user