Remove Notification.Show & _mainViewModel.Show();

This commit is contained in:
Jack251970 2025-04-09 21:16:33 +08:00
parent 4400734963
commit 0a8963b74e
4 changed files with 5 additions and 8 deletions

View file

@ -343,7 +343,7 @@ namespace Flow.Launcher
public void OnSecondAppStarted()
{
Ioc.Default.GetRequiredService<MainViewModel>().Show();
API.ShowMainWindow();
}
#endregion

View file

@ -136,7 +136,7 @@ internal static class HotKeyMapper
if (_mainViewModel.ShouldIgnoreHotkeys())
return;
_mainViewModel.Show();
App.API.ShowMainWindow();
_mainViewModel.ChangeQueryText(hotkey.ActionKeyword, true);
});
}

View file

@ -60,8 +60,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
}
catch (Exception e)
{
Notification.Show(App.API.GetTranslation("setAutoStartFailed"),
e.Message);
App.API.ShowMsg(App.API.GetTranslation("setAutoStartFailed"), e.Message);
}
}
}
@ -88,8 +87,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
}
catch (Exception e)
{
Notification.Show(App.API.GetTranslation("setAutoStartFailed"),
e.Message);
App.API.ShowMsg(App.API.GetTranslation("setAutoStartFailed"), e.Message);
}
}
}

View file

@ -16,7 +16,6 @@ using CommunityToolkit.Mvvm.Input;
using Flow.Launcher.Core.Plugin;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Hotkey;
using Flow.Launcher.Infrastructure.Image;
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.Storage;
using Flow.Launcher.Infrastructure.UserSettings;
@ -275,7 +274,7 @@ namespace Flow.Launcher.ViewModel
Hide();
await PluginManager.ReloadDataAsync().ConfigureAwait(false);
Notification.Show(App.API.GetTranslation("success"),
App.API.ShowMsg(App.API.GetTranslation("success"),
App.API.GetTranslation("completedSuccessfully"));
}