From 3023971cf89c6595ebdbcec351876839812a212e Mon Sep 17 00:00:00 2001 From: Space Time <55327009+SpaceTimee@users.noreply.github.com> Date: Mon, 1 Jan 2024 21:30:06 +0800 Subject: [PATCH] bug fixes --- clashN/clashN/ViewModels/MainWindowViewModel.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); }));