Skip to content

Commit b495540

Browse files
committed
Switch to ActivationViewSwitcher in OnLaunched
1 parent 270884a commit b495540

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Signal-Windows/App.xaml.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ await Views[currentId].Dispatcher.RunTaskAsync(() =>
133133

134134
protected override async void OnLaunched(LaunchActivatedEventArgs e)
135135
{
136+
Logger.LogInformation("Launching (PreviousExecutionState={0})", e.PreviousExecutionState);
136137
try
137138
{
138139
string taskName = "SignalMessageBackgroundTask";
@@ -169,10 +170,6 @@ protected override async void OnLaunched(LaunchActivatedEventArgs e)
169170
Logger.LogError("Cannot setup bg task: {0}\n{1}", ex.Message, ex.StackTrace);
170171
}
171172

172-
173-
Logger.LogInformation("Launching (PreviousExecutionState={0})", e.PreviousExecutionState);
174-
Logger.LogDebug(LocalCacheFolder.Path);
175-
176173
bool createdMainWindow = await CreateMainWindow(null);
177174
if (!createdMainWindow)
178175
{
@@ -184,7 +181,7 @@ protected override async void OnLaunched(LaunchActivatedEventArgs e)
184181
}
185182
else
186183
{
187-
await ApplicationViewSwitcher.TryShowAsStandaloneAsync(currentId);
184+
await switcher.ShowAsStandaloneAsync(currentId);
188185
}
189186
}
190187
}

0 commit comments

Comments
 (0)