diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 063e7d45..91271c54 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -100,6 +100,7 @@ _dialogService.InfoBarMessage(Translator.Info_MissingFolderTitle, message); - **NEVER** create IValueConverter classes or add them to Converters.xaml - **NEVER** use BoolToVisibilityConverter - WinUI 3 SDK automatically converts bool to Visibility - Direct binding: `Visibility="{x:Bind IsVisible, Mode=OneWay}"` +- Register control events (for example `Loaded`, `Unloaded`, `SizeChanged`, `PointerEntered`) in XAML markup, not with `+=` in `.xaml.cs`. ### XamlHelpers for Complex Conversions - **ALWAYS** use XamlHelpers static methods instead of converters diff --git a/Wino.Core.Domain/Interfaces/IMailItemDisplayInformation.cs b/Wino.Core.Domain/Interfaces/IMailItemDisplayInformation.cs index af9dd221..0c2184cc 100644 --- a/Wino.Core.Domain/Interfaces/IMailItemDisplayInformation.cs +++ b/Wino.Core.Domain/Interfaces/IMailItemDisplayInformation.cs @@ -22,7 +22,6 @@ public interface IMailItemDisplayInformation : INotifyPropertyChanged DateTime CreationDate { get; } string Base64ContactPicture { get; } bool ThumbnailUpdatedEvent { get; } - bool IsBusy { get; } bool IsThreadExpanded { get; } AccountContact SenderContact { get; } } diff --git a/Wino.Mail.ViewModels/Data/IMailListItem.cs b/Wino.Mail.ViewModels/Data/IMailListItem.cs index 0d6ffaf6..957915ba 100644 --- a/Wino.Mail.ViewModels/Data/IMailListItem.cs +++ b/Wino.Mail.ViewModels/Data/IMailListItem.cs @@ -32,6 +32,11 @@ public interface IMailListItem : IMailHashContainer, IMailListItemSorting, INoti /// bool IsSelected { get; set; } + /// + /// Gets whether this item is currently processing a network operation. + /// + bool IsBusy { get; } + /// /// Gets all selected mail items within this list item. /// For MailItemViewModel: returns itself if IsSelected is true, otherwise empty diff --git a/Wino.Mail.WinUI/Controls/MailItemDisplayInformationControl.xaml b/Wino.Mail.WinUI/Controls/MailItemDisplayInformationControl.xaml index 8f6c788d..e56972dd 100644 --- a/Wino.Mail.WinUI/Controls/MailItemDisplayInformationControl.xaml +++ b/Wino.Mail.WinUI/Controls/MailItemDisplayInformationControl.xaml @@ -19,7 +19,8 @@ FocusVisualSecondaryBrush="{StaticResource SystemControlFocusVisualSecondaryBrush}" FocusVisualSecondaryThickness="1" PointerEntered="ControlPointerEntered" - PointerExited="ControlPointerExited"> + PointerExited="ControlPointerExited" + Unloaded="OnUnloaded">