mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Move initialized flag
This commit is contained in:
parent
6d64abd21a
commit
e46df28fdd
1 changed files with 1 additions and 8 deletions
|
|
@ -33,8 +33,6 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
||||||
_settings = context.API.LoadSettingJsonStorage<Settings>();
|
_settings = context.API.LoadSettingJsonStorage<Settings>();
|
||||||
|
|
||||||
LoadBookmarksIfEnabled();
|
LoadBookmarksIfEnabled();
|
||||||
|
|
||||||
initialized = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void LoadBookmarksIfEnabled()
|
private static void LoadBookmarksIfEnabled()
|
||||||
|
|
@ -42,12 +40,12 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
||||||
if (context.CurrentPluginMetadata.Disabled)
|
if (context.CurrentPluginMetadata.Disabled)
|
||||||
{
|
{
|
||||||
// Don't load or monitor files if disabled
|
// Don't load or monitor files if disabled
|
||||||
// Note: It doesn't start loading or monitoring if enabled later, you need to manually reload data
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cachedBookmarks = BookmarkLoader.LoadAllBookmarks(_settings);
|
cachedBookmarks = BookmarkLoader.LoadAllBookmarks(_settings);
|
||||||
_ = MonitorRefreshQueueAsync();
|
_ = MonitorRefreshQueueAsync();
|
||||||
|
initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Result> Query(Query query)
|
public List<Result> Query(Query query)
|
||||||
|
|
@ -55,7 +53,6 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
||||||
if (!initialized)
|
if (!initialized)
|
||||||
{
|
{
|
||||||
LoadBookmarksIfEnabled();
|
LoadBookmarksIfEnabled();
|
||||||
initialized = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
string param = query.Search.TrimStart();
|
string param = query.Search.TrimStart();
|
||||||
|
|
@ -140,10 +137,6 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (context.CurrentPluginMetadata.Disabled)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Watchers.Any(x => x.Path.Equals(directory, StringComparison.OrdinalIgnoreCase)))
|
if (Watchers.Any(x => x.Path.Equals(directory, StringComparison.OrdinalIgnoreCase)))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue