diff --git a/Wino.Core.Domain/Translations/en_US/resources.json b/Wino.Core.Domain/Translations/en_US/resources.json
index f8ef8c9f..f44bc796 100644
--- a/Wino.Core.Domain/Translations/en_US/resources.json
+++ b/Wino.Core.Domain/Translations/en_US/resources.json
@@ -299,7 +299,7 @@
"NewAccountDialog_AccountNamePlaceholder": "eg. Personal Mail",
"NewAccountDialog_Title": "Add New Account",
"NoMailSelected": "No message selected",
- "NoMessageCrieteria": "Mo messages match your search criteria",
+ "NoMessageCrieteria": "No messages match your search criteria",
"NoMessageEmptyFolder": "This folder is empty",
"Notifications_MultipleNotificationsMessage": "You have {0} new mails",
"Notifications_MultipleNotificationsTitle": "New Mails",
diff --git a/Wino.Core.Domain/Translator.Designer.cs b/Wino.Core.Domain/Translator.Designer.cs
index 473b8321..283898dd 100644
--- a/Wino.Core.Domain/Translator.Designer.cs
+++ b/Wino.Core.Domain/Translator.Designer.cs
@@ -1519,7 +1519,7 @@ namespace Wino.Core.Domain
public static string NoMailSelected => Resources.GetTranslatedString(@"NoMailSelected");
///
- /// Mo messages match your search criteria
+ /// No messages match your search criteria
///
public static string NoMessageCrieteria => Resources.GetTranslatedString(@"NoMessageCrieteria");
diff --git a/Wino.Mail.ViewModels/MailListPageViewModel.cs b/Wino.Mail.ViewModels/MailListPageViewModel.cs
index 71e0c81c..e9313c1d 100644
--- a/Wino.Mail.ViewModels/MailListPageViewModel.cs
+++ b/Wino.Mail.ViewModels/MailListPageViewModel.cs
@@ -167,6 +167,65 @@ namespace Wino.Mail.ViewModels
});
}
+ #region Properties
+
+ ///
+ /// Selected internal folder. This can be either folder's own name or Focused-Other.
+ ///
+ public FolderPivotViewModel SelectedFolderPivot
+ {
+ get => _selectedFolderPivot;
+ set
+ {
+ if (_selectedFolderPivot != null)
+ _selectedFolderPivot.SelectedItemCount = 0;
+
+ SetProperty(ref _selectedFolderPivot, value);
+ }
+ }
+
+ ///
+ /// Selected sorting option.
+ ///
+ public SortingOption SelectedSortingOption
+ {
+ get => _selectedSortingOption;
+ set
+ {
+ if (SetProperty(ref _selectedSortingOption, value))
+ {
+ if (value != null && MailCollection != null)
+ {
+ MailCollection.SortingType = value.Type;
+ }
+ }
+ }
+ }
+
+ public bool CanSynchronize => !IsAccountSynchronizerInSynchronization && IsFolderSynchronizationEnabled;
+ public bool IsFolderSynchronizationEnabled => ActiveFolder?.IsSynchronizationEnabled ?? false;
+ public int SelectedItemCount => SelectedItems.Count;
+ public bool HasMultipleItemSelections => SelectedItemCount > 1;
+ public bool HasSelectedItems => SelectedItems.Any();
+ public bool IsArchiveSpecialFolder => ActiveFolder?.SpecialFolderType == SpecialFolderType.Archive;
+
+ ///
+ /// Indicates current state of the mail list. Doesn't matter it's loading or no.
+ ///
+ public bool IsEmpty => MailCollection.Count == 0;
+
+ ///
+ /// Progress ring only should be visible when the folder is initializing and there are no items. We don't need to show it when there are items.
+ ///
+ public bool IsProgressRing => IsInitializingFolder && IsEmpty;
+ private bool isFilters => IsInSearchMode || SelectedFilterOption.Type != FilterOptionType.All;
+ public bool IsCriteriaFailed => !IsInitializingFolder && IsEmpty && isFilters;
+ public bool IsFolderEmpty => !IsInitializingFolder && IsEmpty && !isFilters;
+
+ public bool IsInSearchMode { get; set; }
+
+ #endregion
+
private async void ActiveMailItemChanged(MailItemViewModel selectedMailItemViewModel)
{
if (_activeMailItem == selectedMailItemViewModel) return;
@@ -209,64 +268,6 @@ namespace Wino.Mail.ViewModels
}
}
- ///
- /// Selected internal folder. This can be either folder's own name or Focused-Other.
- ///
- public FolderPivotViewModel SelectedFolderPivot
- {
- get => _selectedFolderPivot;
- set
- {
- if (_selectedFolderPivot != null)
- _selectedFolderPivot.SelectedItemCount = 0;
-
- SetProperty(ref _selectedFolderPivot, value);
- }
- }
-
- ///
- /// Selected sorting option.
- ///
- public SortingOption SelectedSortingOption
- {
- get => _selectedSortingOption;
- set
- {
- if (SetProperty(ref _selectedSortingOption, value))
- {
- if (value != null && MailCollection != null)
- {
- MailCollection.SortingType = value.Type;
- }
- }
- }
- }
-
- #region Properties
- public bool CanSynchronize => !IsAccountSynchronizerInSynchronization && IsFolderSynchronizationEnabled;
- public bool IsFolderSynchronizationEnabled => ActiveFolder?.IsSynchronizationEnabled ?? false;
- public int SelectedItemCount => SelectedItems.Count;
- public bool HasMultipleItemSelections => SelectedItemCount > 1;
- public bool HasSelectedItems => SelectedItems.Any();
- public bool IsArchiveSpecialFolder => ActiveFolder?.SpecialFolderType == SpecialFolderType.Archive;
-
- ///
- /// Indicates current state of the mail list. Doesn't matter it's loading or no.
- ///
- public bool IsEmpty => MailCollection.Count == 0;
-
- ///
- /// Progress ring only should be visible when the folder is initializing and there are no items. We don't need to show it when there are items.
- ///
- public bool IsProgressRing => IsInitializingFolder && IsEmpty;
- private bool isFilters => IsInSearchMode || SelectedFilterOption.Type != FilterOptionType.All;
- public bool IsCriteriaFailed => !IsInitializingFolder && IsEmpty && isFilters;
- public bool IsFolderEmpty => !IsInitializingFolder && IsEmpty && !isFilters;
-
- public bool IsInSearchMode { get; set; }
-
- #endregion
-
public void NotifyItemSelected()
{
OnPropertyChanged(nameof(HasSelectedItems));
@@ -284,11 +285,6 @@ namespace Wino.Mail.ViewModels
OnPropertyChanged(nameof(IsFolderEmpty));
}
- [RelayCommand]
- public Task ExecuteHoverAction(MailOperationPreperationRequest request) => ExecuteMailOperationAsync(request);
-
- public Task ExecuteMailOperationAsync(MailOperationPreperationRequest package) => _winoRequestDelegator.ExecuteAsync(package);
-
protected override void OnDispatcherAssigned()
{
base.OnDispatcherAssigned();
@@ -391,6 +387,9 @@ namespace Wino.Mail.ViewModels
#region Commands
+ [RelayCommand]
+ public Task ExecuteHoverAction(MailOperationPreperationRequest request) => ExecuteMailOperationAsync(request);
+
///
/// Executes the requested mail operation for currently selected items.
///
@@ -543,6 +542,8 @@ namespace Wino.Mail.ViewModels
#endregion
+ public Task ExecuteMailOperationAsync(MailOperationPreperationRequest package) => _winoRequestDelegator.ExecuteAsync(package);
+
public IEnumerable GetTargetMailItemViewModels(IMailItem clickedItem)
{
// Threat threads as a whole and include everything in the group. Except single selections outside of the thread.