mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
ProcessKiller: change condition for batch kill
To avoid killing processes by mistake, only give the option to kill all displayed processes when they are all instances of the same executable.
This commit is contained in:
parent
563bf4d797
commit
10ce003dac
1 changed files with 4 additions and 1 deletions
|
|
@ -81,7 +81,10 @@ namespace Flow.Launcher.Plugin.ProcessKiller
|
|||
});
|
||||
}
|
||||
|
||||
if (processlist.Count > 1 && !string.IsNullOrEmpty(termToSearch))
|
||||
// When there are multiple results AND all of them are instances of the same executable
|
||||
// add a quick option to kill them all at the top of the results.
|
||||
var firstResult = results.FirstOrDefault()?.SubTitle;
|
||||
if (processlist.Count > 1 && !string.IsNullOrEmpty(termToSearch) && results.All(r => r.SubTitle == firstResult))
|
||||
{
|
||||
results.Insert(0, new Result()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue