Fix flickering on item selection and context menus.
This commit is contained in:
@@ -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}"
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user