mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Load bookmarks in Query() if not initialized
This commit is contained in:
parent
4591fa76d9
commit
6d64abd21a
1 changed files with 10 additions and 0 deletions
|
|
@ -24,6 +24,8 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
|
||||
private static Settings _settings;
|
||||
|
||||
private static bool initialized = false;
|
||||
|
||||
public void Init(PluginInitContext context)
|
||||
{
|
||||
Main.context = context;
|
||||
|
|
@ -31,6 +33,8 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
_settings = context.API.LoadSettingJsonStorage<Settings>();
|
||||
|
||||
LoadBookmarksIfEnabled();
|
||||
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
private static void LoadBookmarksIfEnabled()
|
||||
|
|
@ -48,6 +52,12 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
|
||||
public List<Result> Query(Query query)
|
||||
{
|
||||
if (!initialized)
|
||||
{
|
||||
LoadBookmarksIfEnabled();
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
string param = query.Search.TrimStart();
|
||||
|
||||
// Should top results be returned? (true if no search parameters have been passed)
|
||||
|
|
|
|||
Loading…
Reference in a new issue