Dispose mail webviews when closing the shell

This commit is contained in:
Burak Kaan Köse
2026-04-20 19:40:32 +02:00
parent d85812ed7b
commit 2b1676a4f7
7 changed files with 129 additions and 12 deletions
@@ -56,7 +56,6 @@ public sealed partial class MailListPage : MailListPageAbstract,
{
private const double RENDERING_COLUMN_MIN_WIDTH = 375;
private const int SELECTION_SETTLE_DELAY_MS = 120;
private const int RENDERING_FRAME_RELEASE_DELAY_MS = 2000;
private int _idleNavigationRequestVersion = 0;
private int _mailActivationRequestVersion = 0;
private IPopoutClient? _activePopoutClient;
@@ -546,11 +545,6 @@ public sealed partial class MailListPage : MailListPageAbstract,
}
}
await Task.Delay(RENDERING_FRAME_RELEASE_DELAY_MS);
if (requestVersion != _idleNavigationRequestVersion) return;
if (ViewModel.MailCollection.SelectedItemsCount != 0) return;
// Ensure rendering frame actually navigates away from Compose/Rendering pages.
// Otherwise those pages keep their messenger registrations alive.
ViewModel.NavigationService.Navigate(WinoPage.IdlePage, null, NavigationReferenceFrame.RenderingFrame, NavigationTransitionType.DrillIn);