Some dispatcher fixes.

This commit is contained in:
Burak Kaan Köse
2025-10-20 18:27:09 +02:00
parent fb56001a52
commit 5e0a0456c4
4 changed files with 9 additions and 94 deletions
@@ -2,6 +2,7 @@
using System.Threading;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.Messaging;
using CommunityToolkit.WinUI;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media.Animation;
using Wino.Core.Domain.Entities.Shared;
@@ -59,7 +60,7 @@ public sealed partial class NewImapSetupDialog : ContentDialog,
if (ImapFrame.CanGoBack)
{
// Go back using Dispatcher to allow navigations in OnNavigatedTo.
await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
await DispatcherQueue.EnqueueAsync(() =>
{
ImapFrame.GoBack();
});