mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Preserve file watchers when monitored files change
This commit is contained in:
parent
e46df28fdd
commit
9b5341c2b7
1 changed files with 4 additions and 3 deletions
|
|
@ -122,7 +122,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
await Task.Delay(5000);
|
||||
if (reader.TryRead(out _))
|
||||
{
|
||||
ReloadAllBookmarks();
|
||||
ReloadAllBookmarks(false);
|
||||
}
|
||||
}
|
||||
fileMonitorSemaphore.Release();
|
||||
|
|
@ -169,10 +169,11 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
ReloadAllBookmarks();
|
||||
}
|
||||
|
||||
public static void ReloadAllBookmarks()
|
||||
public static void ReloadAllBookmarks(bool disposeFileWatchers = true)
|
||||
{
|
||||
cachedBookmarks.Clear();
|
||||
DisposeFileWatchers();
|
||||
if (disposeFileWatchers)
|
||||
DisposeFileWatchers();
|
||||
LoadBookmarksIfEnabled();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue