Skip to content

Commit f6646db

Browse files
committed
No need to switch threads for ShowAsStandaloneAsync here
1 parent 788a60d commit f6646db

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

Signal-Windows/App.xaml.cs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -258,23 +258,7 @@ await newView.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
258258
if (success)
259259
{
260260
Views.Add(newViewId, frontend);
261-
var taskCompletionSource = new TaskCompletionSource<bool>();
262-
await newView.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () =>
263-
{
264-
try
265-
{
266-
await switcher.ShowAsStandaloneAsync(newViewId);
267-
}
268-
catch (Exception e)
269-
{
270-
Logger.LogError("CreateSecondaryWindowOrShowMain() ShowAsStandaloneAsync() failed: {0}\n{1}", e.Message, e.StackTrace);
271-
}
272-
finally
273-
{
274-
taskCompletionSource.SetResult(false);
275-
}
276-
});
277-
await taskCompletionSource.Task;
261+
await switcher.ShowAsStandaloneAsync(newViewId);
278262
Logger.LogInformation("CreateSecondaryWindow() added view {0}", newViewId);
279263
}
280264
else

0 commit comments

Comments
 (0)