diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index cb60251ed..b30454277 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -33,6 +33,12 @@ namespace Flow.Launcher.Plugin
///
void RestartApp();
+ ///
+ /// Restart Flow Launcher with arguments
+ ///
+ /// Application start arguments
+ void RestartApp(string arguments);
+
///
/// Run a shell command
///
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index 66e11f881..751e38c42 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -11,7 +11,6 @@ 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;
@@ -73,8 +72,10 @@ namespace Flow.Launcher
_mainVM.ChangeQueryText(query, requery);
}
+ public void RestartApp() => RestartApp(null);
+
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD100:Avoid async void methods", Justification = "")]
- public async void RestartApp()
+ public async void RestartApp(string arguments)
{
_mainVM.Hide();
@@ -89,7 +90,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);
+ UpdateManager.RestartApp(Constant.ApplicationFileName, arguments);
}
public void ShowMainWindow() => _mainVM.Show();