Skip to content

Commit

Permalink
Fix: Fixed issue where resuming didn't work once it failed (files-com…
Browse files Browse the repository at this point in the history
  • Loading branch information
hishitetsu committed Dec 25, 2023
1 parent e2fb851 commit 3381944
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Files.App/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ async Task ActivateAsync()
/// <summary>
/// Invoked when the application is activated.
/// </summary>
public void OnActivated(AppActivationArguments activatedEventArgs)
public async Task OnActivatedAsync(AppActivationArguments activatedEventArgs)
{
Logger.LogInformation($"The app is being activated. Activation type: {activatedEventArgs.Data.GetType().Name}");

// InitializeApplication accesses UI, needs to be called on UI thread
_ = MainWindow.Instance.DispatcherQueue.EnqueueOrInvokeAsync(()
await MainWindow.Instance.DispatcherQueue.EnqueueOrInvokeAsync(()
=> MainWindow.Instance.InitializeApplicationAsync(activatedEventArgs.Data));
}

Expand Down
4 changes: 2 additions & 2 deletions src/Files.App/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ private static void Main()
});
}

private static void OnActivated(object? sender, AppActivationArguments args)
private static async void OnActivated(object? sender, AppActivationArguments args)
{
if (App.Current is App thisApp)
{
// WINUI3: Verify if needed or OnLaunched is called
thisApp.OnActivated(args);
await thisApp.OnActivatedAsync(args);
}
}

Expand Down

0 comments on commit 3381944

Please sign in to comment.