Online Search (#576)
* Very basic online search for gmail. * Server side of handling offline search and listing part in listing page. * Default search mode implementation and search UI improvements. * Online search for Outlook. * Very basic online search for gmail. * Server side of handling offline search and listing part in listing page. * Default search mode implementation and search UI improvements. * Online search for Outlook. * Online search for imap without downloading the messages yet. TODO * Completing imap search.
This commit is contained in:
@@ -18,6 +18,10 @@ public partial class AppPreferencesPageViewModel : MailBaseViewModel
|
||||
[ObservableProperty]
|
||||
private List<string> _appTerminationBehavior;
|
||||
|
||||
|
||||
[ObservableProperty]
|
||||
public partial List<string> SearchModes { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(IsStartupBehaviorDisabled))]
|
||||
[NotifyPropertyChangedFor(nameof(IsStartupBehaviorEnabled))]
|
||||
@@ -38,6 +42,18 @@ public partial class AppPreferencesPageViewModel : MailBaseViewModel
|
||||
}
|
||||
}
|
||||
|
||||
private string _selectedDefaultSearchMode;
|
||||
public string SelectedDefaultSearchMode
|
||||
{
|
||||
get => _selectedDefaultSearchMode;
|
||||
set
|
||||
{
|
||||
SetProperty(ref _selectedDefaultSearchMode, value);
|
||||
|
||||
PreferencesService.DefaultSearchMode = (SearchMode)SearchModes.IndexOf(value);
|
||||
}
|
||||
}
|
||||
|
||||
private readonly IMailDialogService _dialogService;
|
||||
private readonly IWinoServerConnectionManager _winoServerConnectionManager;
|
||||
private readonly IStartupBehaviorService _startupBehaviorService;
|
||||
@@ -61,7 +77,14 @@ public partial class AppPreferencesPageViewModel : MailBaseViewModel
|
||||
Translator.SettingsAppPreferences_ServerBackgroundingMode_Terminate_Title // "Terminate"
|
||||
];
|
||||
|
||||
SearchModes =
|
||||
[
|
||||
Translator.SettingsAppPreferences_SearchMode_Local,
|
||||
Translator.SettingsAppPreferences_SearchMode_Online
|
||||
];
|
||||
|
||||
SelectedAppTerminationBehavior = _appTerminationBehavior[(int)PreferencesService.ServerTerminationBehavior];
|
||||
SelectedDefaultSearchMode = SearchModes[(int)PreferencesService.DefaultSearchMode];
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
|
||||
Reference in New Issue
Block a user