Code cleanup

Popup discard action now works
This commit is contained in:
BONNEVILLE Geoffroy
2018-01-09 18:40:11 +01:00
parent a19519fa73
commit b46ab8db51
4 changed files with 7 additions and 53 deletions

View File

@@ -149,11 +149,12 @@ namespace ModernKeePass
/// </summary>
/// <param name="sender">The source of the suspend request.</param>
/// <param name="e">Details about the suspend request.</param>
private void OnSuspending(object sender, SuspendingEventArgs e)
private async void OnSuspending(object sender, SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
UnhandledException -= OnUnhandledException;
Database.Save();
await Database.Close();
deferral.Complete();
}