@@ -9,10 +9,10 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
9
9
{
10
10
public class FirefoxBookmarkLoader : IBookmarkLoader
11
11
{
12
- private const string queryAllBookmarks = @"SELECT moz_places.url, moz_bookmarks.title
12
+ private const string QueryAllBookmarks = @"SELECT moz_places.url, moz_bookmarks.title
13
13
FROM moz_places
14
14
INNER JOIN moz_bookmarks ON (
15
- moz_bookmarks.fk NOT NULL AND moz_bookmarks.fk = moz_places.id
15
+ moz_bookmarks.fk NOT NULL AND moz_bookmarks.title NOT NULL AND moz_bookmarks. fk = moz_places.id
16
16
)
17
17
ORDER BY moz_places.visit_count DESC
18
18
" ;
@@ -32,18 +32,16 @@ public List<Bookmark> GetBookmarks()
32
32
33
33
// create the connection string and init the connection
34
34
string dbPath = string . Format ( dbPathFormat , PlacesPath ) ;
35
- using ( var dbConnection = new SQLiteConnection ( dbPath ) )
36
- {
37
- // Open connection to the database file and execute the query
38
- dbConnection . Open ( ) ;
39
- var reader = new SQLiteCommand ( queryAllBookmarks , dbConnection ) . ExecuteReader ( ) ;
40
-
41
- // return results in List<Bookmark> format
42
- bookmarkList = reader . Select (
43
- x => new Bookmark ( x [ "title" ] is DBNull ? string . Empty : x [ "title" ] . ToString ( ) ,
44
- x [ "url" ] . ToString ( ) )
45
- ) . ToList ( ) ;
46
- }
35
+ using var dbConnection = new SQLiteConnection ( dbPath ) ;
36
+ // Open connection to the database file and execute the query
37
+ dbConnection . Open ( ) ;
38
+ var reader = new SQLiteCommand ( QueryAllBookmarks , dbConnection ) . ExecuteReader ( ) ;
39
+
40
+ // return results in List<Bookmark> format
41
+ bookmarkList = reader . Select (
42
+ x => new Bookmark ( x [ "title" ] is DBNull ? string . Empty : x [ "title" ] . ToString ( ) ,
43
+ x [ "url" ] . ToString ( ) )
44
+ ) . ToList ( ) ;
47
45
48
46
return bookmarkList ;
49
47
}
0 commit comments