|
|
@ -103,6 +103,8 @@ public partial class CheckpointsPageViewModel : PageViewModelBase |
|
|
|
? Resources.Action_ClearSelection |
|
|
|
? Resources.Action_ClearSelection |
|
|
|
: Resources.Action_SelectAll; |
|
|
|
: Resources.Action_SelectAll; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private bool isClearing = false; |
|
|
|
|
|
|
|
|
|
|
|
public CheckpointsPageViewModel( |
|
|
|
public CheckpointsPageViewModel( |
|
|
|
ISharedFolders sharedFolders, |
|
|
|
ISharedFolders sharedFolders, |
|
|
|
ISettingsManager settingsManager, |
|
|
|
ISettingsManager settingsManager, |
|
|
@ -129,9 +131,12 @@ public partial class CheckpointsPageViewModel : PageViewModelBase |
|
|
|
|
|
|
|
|
|
|
|
CheckpointFoldersCache.Refresh(); |
|
|
|
CheckpointFoldersCache.Refresh(); |
|
|
|
OnPropertyChanged(nameof(ClearButtonText)); |
|
|
|
OnPropertyChanged(nameof(ClearButtonText)); |
|
|
|
|
|
|
|
if (!isClearing) |
|
|
|
|
|
|
|
{ |
|
|
|
settingsManager.Transaction( |
|
|
|
settingsManager.Transaction( |
|
|
|
settings => settings.SelectedBaseModels = SelectedBaseModels.ToList() |
|
|
|
settings => settings.SelectedBaseModels = SelectedBaseModels.ToList() |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
CheckpointFoldersCache |
|
|
|
CheckpointFoldersCache |
|
|
@ -173,7 +178,10 @@ public partial class CheckpointsPageViewModel : PageViewModelBase |
|
|
|
IsLoading = false; |
|
|
|
IsLoading = false; |
|
|
|
IsIndexing = false; |
|
|
|
IsIndexing = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
isClearing = true; |
|
|
|
SelectedBaseModels.Clear(); |
|
|
|
SelectedBaseModels.Clear(); |
|
|
|
|
|
|
|
isClearing = false; |
|
|
|
|
|
|
|
|
|
|
|
SelectedBaseModels.AddRange(settingsManager.Settings.SelectedBaseModels); |
|
|
|
SelectedBaseModels.AddRange(settingsManager.Settings.SelectedBaseModels); |
|
|
|
|
|
|
|
|
|
|
|
Logger.Info($"OnLoadedAsync in {sw.ElapsedMilliseconds}ms"); |
|
|
|
Logger.Info($"OnLoadedAsync in {sw.ElapsedMilliseconds}ms"); |
|
|
@ -234,6 +242,10 @@ public partial class CheckpointsPageViewModel : PageViewModelBase |
|
|
|
|| x.ConnectedModel?.Tags.Any( |
|
|
|
|| x.ConnectedModel?.Tags.Any( |
|
|
|
t => t.Contains(SearchFilter, StringComparison.OrdinalIgnoreCase) |
|
|
|
t => t.Contains(SearchFilter, StringComparison.OrdinalIgnoreCase) |
|
|
|
) == true |
|
|
|
) == true |
|
|
|
|
|
|
|
|| x.ConnectedModel?.TrainedWordsString.Contains( |
|
|
|
|
|
|
|
SearchFilter, |
|
|
|
|
|
|
|
StringComparison.OrdinalIgnoreCase |
|
|
|
|
|
|
|
) == true |
|
|
|
) |
|
|
|
) |
|
|
|
|| |
|
|
|
|| |
|
|
|
// If no matching files were found in the current folder, check in all subfolders |
|
|
|
// If no matching files were found in the current folder, check in all subfolders |
|
|
|