diff --git a/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs b/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs index 6e7e183c..65dd938e 100644 --- a/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs @@ -156,7 +156,7 @@ public class ProfilesViewModel : MyReactiveObject { await MoveServer(EMove.Bottom); }, canEditRemove); - MoveToGroupCmd = ReactiveCommand.CreateFromTask(async sub => + MoveToGroupCmd = ReactiveCommand.Create(sub => { SelectedMoveToGroup = sub; }); diff --git a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs index 932973ca..b4759bb1 100644 --- a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs @@ -441,7 +441,7 @@ public partial class MainWindow : WindowBase private void BtnLinuxMinimize_Click(object? sender, RoutedEventArgs e) { - WindowState = WindowState.Minimized; + HideToTray(); } private void BtnLinuxMaximizeRestore_Click(object? sender, RoutedEventArgs e) @@ -510,7 +510,7 @@ public partial class MainWindow : WindowBase { if (Utils.IsLinux() && _config.UiItem.Hide2TrayWhenClose == false) { - WindowState = WindowState.Minimized; + HideToTray(); return; }