Browse Source

Fix text display when NSFW mode enabled & you haven't searched yet

pull/5/head
JT 1 year ago
parent
commit
667847b72c
  1. 6
      StabilityMatrix/ViewModels/CheckpointBrowserViewModel.cs

6
StabilityMatrix/ViewModels/CheckpointBrowserViewModel.cs

@ -294,6 +294,10 @@ public partial class CheckpointBrowserViewModel : ObservableObject
{
settingsManager.SetModelBrowserNsfwEnabled(value);
ModelCardsView?.Refresh();
if (!HasSearched)
return;
UpdateResultsText();
}
@ -329,7 +333,7 @@ public partial class CheckpointBrowserViewModel : ObservableObject
private void UpdateResultsText()
{
NoResultsFound = ModelCardsView?.IsEmpty ?? true;
NoResultsText = ModelCards?.Count == 0
NoResultsText = ModelCards == null || ModelCards.Count == 0
? "No results found"
: $"{ModelCards?.Count} results hidden by filters";
}

Loading…
Cancel
Save