Skip to content

Commit

Permalink
keep main login clean
Browse files Browse the repository at this point in the history
  • Loading branch information
bao-qian committed Apr 22, 2020
1 parent 3ae5560 commit 552010a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Plugins/Wox.Plugin.Program/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ public Main()
{
_settingsStorage = new PluginJsonStorage<Settings>();
_settings = _settingsStorage.Load();

preloadPrograms();
IndexPrograms();
}

private static void preloadPrograms()
{
Stopwatch.Normal("|Wox.Plugin.Program.Main|Preload programs cost", () =>
{
_win32Storage = new BinaryStorage<Win32[]>("Win32");
Expand All @@ -42,8 +48,6 @@ public Main()
});
Log.Info($"|Wox.Plugin.Program.Main|Number of preload win32 programs <{_win32s.Length}>");
Log.Info($"|Wox.Plugin.Program.Main|Number of preload uwps <{_uwps.Length}>");

IndexPrograms();
}

public void Save()
Expand Down

0 comments on commit 552010a

Please sign in to comment.