From 2ea65dc5567d6c3bfc441b920a091aa5a78f786c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Kaan=20K=C3=B6se?= Date: Mon, 20 Apr 2026 22:51:20 +0200 Subject: [PATCH] Remove the confirmamtion when compose page is dismissed after closing the window. --- Wino.Mail.WinUI/ShellWindow.xaml.cs | 35 ----------------------------- 1 file changed, 35 deletions(-) diff --git a/Wino.Mail.WinUI/ShellWindow.xaml.cs b/Wino.Mail.WinUI/ShellWindow.xaml.cs index bb7c87c0..c11f9344 100644 --- a/Wino.Mail.WinUI/ShellWindow.xaml.cs +++ b/Wino.Mail.WinUI/ShellWindow.xaml.cs @@ -413,41 +413,6 @@ public sealed partial class ShellWindow : WindowEx, IWinoShellWindow, if (shellPage.GetShellFrame().Content is not MailListPage mailListPage) return true; - var renderingFrame = mailListPage.FindName("RenderingFrame") as Frame; - - if (renderingFrame?.Content is ComposePage composePage) - { - var closeResult = await MailDialogService.ShowThreeButtonDialogAsync( - Translator.DialogMessage_CloseDraftWindowConfirmationTitle, - Translator.DialogMessage_CloseDraftWindowConfirmationMessage, - Translator.Buttons_Save, - Translator.Buttons_Discard, - Translator.Buttons_Cancel, - WinoCustomMessageDialogIcon.Warning); - - if (closeResult == ThreeButtonDialogResult.Cancel) - { - return false; - } - - try - { - if (closeResult == ThreeButtonDialogResult.Primary) - { - await composePage.ViewModel.SaveDraftAsync(); - } - else - { - await composePage.ViewModel.DiscardDraftAsync(requireConfirmation: false); - } - } - catch (Exception ex) - { - MailDialogService.InfoBarMessage(Translator.GeneralTitle_Error, ex.Message, InfoBarMessageType.Error); - return false; - } - } - await mailListPage.ViewModel.MailCollection.UnselectAllAsync(); WeakReferenceMessenger.Default.Send(new DisposeRenderingFrameRequested());