Use ModernKeePass Lib 2.38.2

Changed suspension save errors handling
This commit is contained in:
BONNEVILLE Geoffroy
2018-03-12 12:45:12 +01:00
parent 7613629d87
commit 56129253d9
3 changed files with 11 additions and 5 deletions

View File

@@ -183,10 +183,16 @@ namespace ModernKeePass
private async void OnSuspending(object sender, SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
UnhandledException -= OnUnhandledException;
var database = DatabaseService.Instance;
if (SettingsService.Instance.GetSetting("SaveSuspend", true)) database.Save();
await database.Close(false);
try
{
if (SettingsService.Instance.GetSetting("SaveSuspend", true)) database.Save();
await database.Close(false);
}
catch (Exception exception)
{
ToastNotificationHelper.ShowErrorToast(exception);
}
deferral.Complete();
}