Browse Source

also show notification if no favorites & try to sort by favorites

pull/165/head
JT 1 year ago
parent
commit
fb625bab12
  1. 11
      StabilityMatrix.Avalonia/ViewModels/CheckpointBrowserViewModel.cs

11
StabilityMatrix.Avalonia/ViewModels/CheckpointBrowserViewModel.cs

@ -13,6 +13,7 @@ using System.Threading.Tasks;
using AsyncAwaitBestPractices;
using Avalonia.Collections;
using Avalonia.Controls;
using Avalonia.Controls.Notifications;
using AvaloniaEdit.Utils;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
@ -455,6 +456,16 @@ public partial class CheckpointBrowserViewModel : PageViewModelBase
{
var favoriteModels = settingsManager.Settings.FavoriteModels;
if (!favoriteModels.Any())
{
notificationService.Show(
"No Favorites",
"You have not added any models to your Favorites.",
NotificationType.Error
);
return;
}
modelRequest.CommaSeparatedModelIds = string.Join(",", favoriteModels);
modelRequest.Sort = null;
modelRequest.Period = null;

Loading…
Cancel
Save