Fix flickering on item selection and context menus.

This commit is contained in:
Burak Kaan Köse
2025-10-20 19:17:52 +02:00
parent 5e0a0456c4
commit 8e16908fce
3 changed files with 12 additions and 2 deletions
+2
View File
@@ -72,6 +72,7 @@
x:DefaultBindMode="OneWay"
CenterHoverAction="{Binding ElementName=root, Path=ViewModel.PreferencesService.CenterHoverAction, Mode=OneWay}"
ContextRequested="MailItemContextRequested"
DataContext="{x:Bind}"
DisplayMode="{Binding ElementName=root, Path=ViewModel.PreferencesService.MailItemDisplayMode, Mode=OneWay}"
HoverActionExecutedCommand="{Binding ElementName=root, Path=ViewModel.ExecuteHoverActionCommand}"
IsAvatarVisible="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsShowSenderPicturesEnabled, Mode=OneWay}"
@@ -112,6 +113,7 @@
x:DefaultBindMode="OneWay"
CenterHoverAction="{Binding ElementName=root, Path=ViewModel.PreferencesService.CenterHoverAction, Mode=OneWay}"
ContextRequested="MailItemContextRequested"
DataContext="{x:Bind}"
DisplayMode="{Binding ElementName=root, Path=ViewModel.PreferencesService.MailItemDisplayMode, Mode=OneWay}"
HoverActionExecutedCommand="{Binding ElementName=root, Path=ViewModel.ExecuteHoverActionCommand}"
IsAvatarVisible="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsShowSenderPicturesEnabled, Mode=OneWay}"
+2 -2
View File
@@ -540,9 +540,9 @@ public sealed partial class MailListPage : MailListPageAbstract,
private void ListSelectionChanged(ItemsView sender, ItemsViewSelectionChangedEventArgs args)
{
UpdateSelectAllButtonStatus();
UpdateAdaptiveness();
SynchronizeSelectedItems();
UpdateAdaptiveness();
}
private static object _selectedItemsLock = new object();
@@ -121,6 +121,10 @@ public sealed partial class MailRenderingPage : MailRenderingPageAbstract,
{
base.OnNavigatedFrom(e);
WeakReferenceMessenger.Default.Unregister<HtmlRenderingRequested>(this);
WeakReferenceMessenger.Default.Unregister<CancelRenderingContentRequested>(this);
WeakReferenceMessenger.Default.Unregister<ApplicationThemeChanged>(this);
// Disposing the page.
// Make sure the WebView2 is disposed properly.
@@ -150,6 +154,10 @@ public sealed partial class MailRenderingPage : MailRenderingPageAbstract,
{
base.OnNavigatedTo(e);
WeakReferenceMessenger.Default.Register<HtmlRenderingRequested>(this);
WeakReferenceMessenger.Default.Register<CancelRenderingContentRequested>(this);
WeakReferenceMessenger.Default.Register<ApplicationThemeChanged>(this);
var anim = ConnectedAnimationService.GetForCurrentView().GetAnimation("WebViewConnectedAnimation");
anim?.TryStart(Chromium);