Skip to content

Commit 18acea3

Browse files
committed
remove dup RegisterBookmarkFile & update condition
1 parent 25cc50b commit 18acea3

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ protected List<Bookmark> LoadBookmarksFromFile(string path, string source)
3434
if (!File.Exists(path))
3535
return new();
3636

37-
Main.RegisterBookmarkFile(path);
38-
3937
var bookmarks = new List<Bookmark>();
4038
using var jsonDocument = JsonDocument.Parse(File.ReadAllText(path));
4139
if (!jsonDocument.RootElement.TryGetProperty("roots", out var rootElement))

Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/BookmarkLoader.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
using Flow.Launcher.Infrastructure;
44
using Flow.Launcher.Plugin.BrowserBookmark.Models;
55
using Flow.Launcher.Plugin.SharedModels;
6-
using Microsoft.AspNetCore.Authentication;
7-
using System.IO;
8-
using System.Threading.Channels;
9-
using System.Threading.Tasks;
106

117
namespace Flow.Launcher.Plugin.BrowserBookmark.Commands
128
{

Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
99
{
1010
public class FirefoxBookmarkLoader : IBookmarkLoader
1111
{
12-
private const string QueryAllBookmarks = @"SELECT moz_places.url, moz_bookmarks.title
12+
private const string queryAllBookmarks = @"SELECT moz_places.url, moz_bookmarks.title
1313
FROM moz_places
1414
INNER JOIN moz_bookmarks ON (
1515
moz_bookmarks.fk NOT NULL AND moz_bookmarks.title NOT NULL AND moz_bookmarks.fk = moz_places.id
@@ -37,7 +37,7 @@ public List<Bookmark> GetBookmarks()
3737
using var dbConnection = new SQLiteConnection(dbPath);
3838
// Open connection to the database file and execute the query
3939
dbConnection.Open();
40-
var reader = new SQLiteCommand(QueryAllBookmarks, dbConnection).ExecuteReader();
40+
var reader = new SQLiteCommand(queryAllBookmarks, dbConnection).ExecuteReader();
4141

4242
// return results in List<Bookmark> format
4343
bookmarkList = reader.Select(

Plugins/Flow.Launcher.Plugin.Program/Main.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,11 @@ private void DisableProgram(IProgram programToDelete)
212212
return;
213213

214214
if (_uwps.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier))
215-
_uwps.FirstOrDefault(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)!
215+
_uwps.FirstOrDefault(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)
216216
.Enabled = false;
217217

218218
if (_win32s.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier))
219-
_win32s.FirstOrDefault(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)!
219+
_win32s.FirstOrDefault(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)
220220
.Enabled = false;
221221

222222
_settings.DisabledProgramSources

0 commit comments

Comments
 (0)