Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Fixed issue where resuming didn't work once it failed #14290

Merged
merged 1 commit into from
Dec 25, 2023
Merged
Show file tree
Hide file tree
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
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