Revert "Add new restart api"

This reverts commit 7611b00287.
This commit is contained in:
Jack251970 2025-05-23 11:01:32 +08:00
parent 1073061bda
commit e9c40e4586
2 changed files with 3 additions and 10 deletions

View file

@ -33,12 +33,6 @@ namespace Flow.Launcher.Plugin
/// </summary>
void RestartApp();
/// <summary>
/// Restart Flow Launcher with arguments
/// </summary>
/// <param name="arguments">Application start arguments</param>
void RestartApp(string arguments);
/// <summary>
/// Run a shell command
/// </summary>

View file

@ -11,6 +11,7 @@ using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Core;
@ -72,10 +73,8 @@ namespace Flow.Launcher
_mainVM.ChangeQueryText(query, requery);
}
public void RestartApp() => RestartApp(null);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD100:Avoid async void methods", Justification = "<Pending>")]
public async void RestartApp(string arguments)
public async void RestartApp()
{
_mainVM.Hide();
@ -90,7 +89,7 @@ namespace Flow.Launcher
// Restart requires Squirrel's Update.exe to be present in the parent folder,
// it is only published from the project's release pipeline. When debugging without it,
// the project may not restart or just terminates. This is expected.
UpdateManager.RestartApp(Constant.ApplicationFileName, arguments);
UpdateManager.RestartApp(Constant.ApplicationFileName);
}
public void ShowMainWindow() => _mainVM.Show();