Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public sealed partial class SavingDataReason : Page
private MainPage rootPage = MainPage.Current;

private CancellationTokenSource cancellationTokenSource;
private SuspendingDeferral suspendDeferral;

public SavingDataReason()
{
Expand All @@ -50,7 +49,7 @@ protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)

private async void OnSuspending(object sender, SuspendingEventArgs args)
{
suspendDeferral = args.SuspendingOperation.GetDeferral();
var suspendDeferral = args.SuspendingOperation.GetDeferral();

rootPage.NotifyUser("", NotifyType.StatusMessage);

Expand Down Expand Up @@ -112,9 +111,6 @@ await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
rootPage.NotifyUser("Extended execution revoked due to system policy.", NotifyType.StatusMessage);
break;
}

suspendDeferral?.Complete();
suspendDeferral = null;
});
}
}
Expand Down