Reindex when disable program from results

This commit is contained in:
Vic 2022-10-18 21:30:55 +08:00
parent bcd2b8d658
commit fac76af685

View file

@ -196,12 +196,17 @@ namespace Flow.Launcher.Plugin.Program
return;
if (_uwps.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier))
{
_uwps.FirstOrDefault(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)
.Enabled = false;
if (_win32s.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier))
Task.Run(IndexUwpPrograms);
}
else if (_win32s.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier))
{
_win32s.FirstOrDefault(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)
.Enabled = false;
Task.Run(IndexWin32Programs);
}
_settings.DisabledProgramSources
.Add(
@ -213,6 +218,7 @@ namespace Flow.Launcher.Plugin.Program
Enabled = false
}
);
_settings.LastIndexTime = DateTime.Today;
}
public static void StartProcess(Func<ProcessStartInfo, Process> runProcess, ProcessStartInfo info)