Skip to content

Commit

Permalink
Switch to ActivationViewSwitcher in OnLaunched
Browse files Browse the repository at this point in the history
  • Loading branch information
Trolldemorted committed May 9, 2018
1 parent 270884a commit b495540
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Signal-Windows/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ await Views[currentId].Dispatcher.RunTaskAsync(() =>

protected override async void OnLaunched(LaunchActivatedEventArgs e)
{
Logger.LogInformation("Launching (PreviousExecutionState={0})", e.PreviousExecutionState);
try
{
string taskName = "SignalMessageBackgroundTask";
Expand Down Expand Up @@ -169,10 +170,6 @@ protected override async void OnLaunched(LaunchActivatedEventArgs e)
Logger.LogError("Cannot setup bg task: {0}\n{1}", ex.Message, ex.StackTrace);
}


Logger.LogInformation("Launching (PreviousExecutionState={0})", e.PreviousExecutionState);
Logger.LogDebug(LocalCacheFolder.Path);

bool createdMainWindow = await CreateMainWindow(null);
if (!createdMainWindow)
{
Expand All @@ -184,7 +181,7 @@ protected override async void OnLaunched(LaunchActivatedEventArgs e)
}
else
{
await ApplicationViewSwitcher.TryShowAsStandaloneAsync(currentId);
await switcher.ShowAsStandaloneAsync(currentId);
}
}
}
Expand Down

0 comments on commit b495540

Please sign in to comment.