diff --git a/clashN/clashN/ViewModels/MainWindowViewModel.cs b/clashN/clashN/ViewModels/MainWindowViewModel.cs index ad5ff2f..38ca6a0 100644 --- a/clashN/clashN/ViewModels/MainWindowViewModel.cs +++ b/clashN/clashN/ViewModels/MainWindowViewModel.cs @@ -25,6 +25,7 @@ public class MainWindowViewModel : ReactiveObject private NoticeHandler? _noticeHandler; private StatisticsHandler? statistics; private readonly PaletteHelper _paletteHelper = new PaletteHelper(); + private bool blFirst = true; #region Views @@ -137,6 +138,7 @@ public MainWindowViewModel(ISnackbarMessageQueue snackbarMessageQueue) Application.Current.Dispatcher.Invoke((Action)(() => { ShowHideWindow(false); + blFirst = false; })); }); } @@ -220,7 +222,8 @@ private void OnProgramStarted(object state, bool timeout) } } - ShowHideWindow(true); + if (!blFirst) + ShowHideWindow(true); Locator.Current.GetService()?.AddProfilesViaClipboard(true); }));