- fix: return addfavorite button

This commit is contained in:
2025-06-15 17:13:31 +03:00
parent c4ff903c57
commit ba8153e6b4
4 changed files with 39 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
using System;
using CommunityToolkit.Mvvm.ComponentModel;
using Nebula.Launcher.ServerListProviders;
using Nebula.Launcher.ViewModels.Pages;
using Nebula.Launcher.Views.Pages;
using Nebula.Shared.Services;
@@ -28,6 +29,7 @@ public partial class AddFavoriteViewModel : PopupViewModelBase
public override PopupMessageService PopupMessageService { get; }
[GenerateProperty] private ServerOverviewModel ServerOverviewModel { get; }
[GenerateProperty] private DebugService DebugService { get; }
[GenerateProperty] private FavoriteServerListProvider FavoriteServerListProvider { get; }
public override string Title => "Add to favorite";
public override bool IsClosable => true;
@@ -39,6 +41,7 @@ public partial class AddFavoriteViewModel : PopupViewModelBase
try
{
var uri = IpInput.ToRobustUrl();
FavoriteServerListProvider.AddFavorite(uri);
Dispose();
}
catch (Exception e)