mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
detect windows version
This commit is contained in:
parent
73056534bb
commit
9fc0e03b3d
2 changed files with 8 additions and 6 deletions
|
|
@ -128,7 +128,7 @@ namespace Flow.Launcher.Plugin.Program
|
|||
await indexTask;
|
||||
|
||||
Win32.WatchProgramUpdate(_settings);
|
||||
UWP.WatchUWPInstallation();
|
||||
UWP.WatchPackageChange();
|
||||
}
|
||||
|
||||
public static void IndexWin32Programs()
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ using Flow.Launcher.Plugin.Program.Logger;
|
|||
using Rect = System.Windows.Rect;
|
||||
using Flow.Launcher.Plugin.SharedModels;
|
||||
using Flow.Launcher.Infrastructure.Logger;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace Flow.Launcher.Plugin.Program.Programs
|
||||
{
|
||||
|
|
@ -251,12 +252,13 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
watcher.EnableRaisingEvents = true;
|
||||
}
|
||||
|
||||
public static void WatchUWPInstallation()
|
||||
public static void WatchPackageChange()
|
||||
{
|
||||
PackageCatalog.OpenForCurrentUser().PackageStatusChanged += (_, _) =>
|
||||
{
|
||||
Task.Delay(10000).ContinueWith(t => Main.IndexUwpPrograms());
|
||||
};
|
||||
if (Environment.OSVersion.Version.Build >= 19041)
|
||||
PackageCatalog.OpenForCurrentUser().PackageStatusChanged += (_, _) =>
|
||||
{
|
||||
Task.Delay(10000).ContinueWith(t => Main.IndexUwpPrograms());
|
||||
};
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
|
|
|||
Loading…
Reference in a new issue