Some dispatcher fixes.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using CommunityToolkit.WinUI;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
@@ -46,9 +47,9 @@ public sealed partial class AccountCreationDialogControl : UserControl, IRecipie
|
||||
|
||||
await Task.Delay(2000);
|
||||
|
||||
await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
|
||||
await DispatcherQueue.EnqueueAsync(async () =>
|
||||
{
|
||||
AuthHelpDialogButton.Visibility = Microsoft.UI.Xaml.Visibility.Visible;
|
||||
AuthHelpDialogButton.Visibility = Microsoft.UI.Xaml.Visibility.Collapsed;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using MoreLinq;
|
||||
using Microsoft.UI.Xaml.Media.Animation;
|
||||
using Microsoft.UI.Xaml.Navigation;
|
||||
using MoreLinq;
|
||||
using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.WinUI.Views.Abstract;
|
||||
@@ -97,13 +96,13 @@ public sealed partial class ManageAccountsPage : ManageAccountsPageAbstract,
|
||||
GoBackFrame();
|
||||
}
|
||||
|
||||
public async void Receive(AccountUpdatedMessage message)
|
||||
public void Receive(AccountUpdatedMessage message)
|
||||
{
|
||||
var activePage = PageHistory.FirstOrDefault(a => a.Request.PageType == WinoPage.AccountDetailsPage);
|
||||
|
||||
if (activePage == null) return;
|
||||
|
||||
await Dispatcher.TryRunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
|
||||
DispatcherQueue.TryEnqueue(() =>
|
||||
{
|
||||
activePage.Title = message.Account.Name;
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
<Solution>
|
||||
<Configurations>
|
||||
<Platform Name="Any CPU" />
|
||||
<Platform Name="arm64" />
|
||||
<Platform Name="x64" />
|
||||
<Platform Name="x86" />
|
||||
</Configurations>
|
||||
<Folder Name="/Solution Items/" Id="8ec462fd-d22e-90a8-e5ce-7e832ba40c5d">
|
||||
<File Path=".editorconfig" />
|
||||
<File Path="Directory.Build.Props" />
|
||||
<File Path="Directory.Packages.props" />
|
||||
<File Path="nuget.config" />
|
||||
<File Path="Settings.XamlStyler" />
|
||||
</Folder>
|
||||
<Folder Name="/lib/">
|
||||
<Project Path="Wino.Authentication/Wino.Authentication.csproj">
|
||||
<Platform Solution="*|Any CPU" Project="x64" />
|
||||
<Platform Solution="*|arm64" Project="arm64" />
|
||||
<Platform Solution="*|x64" Project="x64" />
|
||||
<Platform Solution="*|x86" Project="x86" />
|
||||
</Project>
|
||||
<Project Path="Wino.Calendar.ViewModels/Wino.Calendar.ViewModels.csproj">
|
||||
<Platform Solution="*|arm64" Project="arm64" />
|
||||
<Platform Solution="*|x64" Project="x64" />
|
||||
<Platform Solution="*|x86" Project="x86" />
|
||||
</Project>
|
||||
<Project Path="Wino.Core.Domain/Wino.Core.Domain.csproj">
|
||||
<BuildDependency Project="Wino.SourceGenerators/Wino.SourceGenerators.csproj" />
|
||||
<Platform Solution="*|Any CPU" Project="x64" />
|
||||
<Platform Solution="*|arm64" Project="arm64" />
|
||||
<Platform Solution="*|x64" Project="x64" />
|
||||
<Platform Solution="*|x86" Project="x86" />
|
||||
</Project>
|
||||
<Project Path="Wino.Core.UWP/Wino.Core.UWP.csproj">
|
||||
<Platform Solution="*|Any CPU" Project="x64" />
|
||||
<Platform Solution="*|arm64" Project="arm64" />
|
||||
<Platform Solution="*|x64" Project="x64" />
|
||||
<Platform Solution="*|x86" Project="x86" />
|
||||
</Project>
|
||||
<Project Path="Wino.Core.ViewModels/Wino.Core.ViewModels.csproj">
|
||||
<Platform Solution="*|Any CPU" Project="x64" />
|
||||
<Platform Solution="*|arm64" Project="arm64" />
|
||||
<Platform Solution="*|x64" Project="x64" />
|
||||
<Platform Solution="*|x86" Project="x86" />
|
||||
</Project>
|
||||
<Project Path="Wino.Core/Wino.Core.csproj">
|
||||
<Platform Solution="*|Any CPU" Project="x64" />
|
||||
<Platform Solution="*|arm64" Project="arm64" />
|
||||
<Platform Solution="*|x64" Project="x64" />
|
||||
<Platform Solution="*|x86" Project="x86" />
|
||||
</Project>
|
||||
<Project Path="Wino.Messages/Wino.Messaging.csproj">
|
||||
<Platform Solution="*|Any CPU" Project="x64" />
|
||||
<Platform Solution="*|arm64" Project="arm64" />
|
||||
<Platform Solution="*|x64" Project="x64" />
|
||||
<Platform Solution="*|x86" Project="x86" />
|
||||
</Project>
|
||||
<Project Path="Wino.Services/Wino.Services.csproj">
|
||||
<Platform Solution="*|Any CPU" Project="x64" />
|
||||
<Platform Solution="*|arm64" Project="arm64" />
|
||||
<Platform Solution="*|x64" Project="x64" />
|
||||
<Platform Solution="*|x86" Project="x86" />
|
||||
</Project>
|
||||
<Project Path="Wino.SourceGenerators/Wino.SourceGenerators.csproj" />
|
||||
</Folder>
|
||||
<Project Path="Wino.Calendar/Wino.Calendar.csproj">
|
||||
<Platform Solution="*|Any CPU" Project="x64" />
|
||||
<Platform Solution="*|arm64" Project="arm64" />
|
||||
<Platform Solution="*|x64" Project="x64" />
|
||||
<Platform Solution="*|x86" Project="x86" />
|
||||
<Deploy Solution="*|arm64" />
|
||||
<Deploy Solution="*|x64" />
|
||||
<Deploy Solution="*|x86" />
|
||||
</Project>
|
||||
<Project Path="Wino.Server/Wino.Server.csproj">
|
||||
<Platform Solution="*|Any CPU" Project="x64" />
|
||||
<Platform Solution="*|arm64" Project="ARM64" />
|
||||
<Platform Solution="*|x64" Project="x64" />
|
||||
<Platform Solution="*|x86" Project="x86" />
|
||||
</Project>
|
||||
<Project Path="WinoCalendar.Packaging/WinoCalendar.Packaging.wapproj" Type="c7167f0d-bc9f-4e6e-afe1-012c56b48db5" Id="52c4d001-f64b-43d5-8b78-3be45aea63e9">
|
||||
<Platform Solution="*|Any CPU" Project="x64" />
|
||||
<Platform Solution="*|arm64" Project="ARM64" />
|
||||
<Deploy />
|
||||
</Project>
|
||||
</Solution>
|
||||
Reference in New Issue
Block a user