You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app.js
+64-5Lines changed: 64 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -87,8 +87,31 @@ async function initSQLite() {
87
87
asyncfunctionloadBookmarks(){
88
88
updateLoadingMessage('Loading bookmarks...');
89
89
try{
90
-
constlists=db.exec({sql: `SELECT id, name, description, icon, parentId FROM bookmarkLists ORDER BY name`,returnValue: "resultRows",rowMode: "object"});
91
-
constbookmarksInLists=db.exec({sql: `SELECT b.id, b.title, bl.url, bl.favicon, bl.description, bil.listId FROM bookmarks b JOIN bookmarkLinks bl ON b.id = bl.id JOIN bookmarksInLists bil ON b.id = bil.bookmarkId WHERE b.type = 'link' ORDER BY b.title`,returnValue: "resultRows",rowMode: "object"});
90
+
constlists=db.exec({
91
+
sql: `SELECT id, name, description, icon, parentId FROM bookmarkLists ORDER BY name`,
92
+
returnValue: "resultRows",
93
+
rowMode: "object"
94
+
});
95
+
96
+
// FIXED: Now selecting both b.title and bl.title
97
+
constbookmarksInLists=db.exec({
98
+
sql: `SELECT
99
+
b.id,
100
+
b.title as bookmark_title,
101
+
bl.title as link_title, -- Added this line to get the crawled title
102
+
bl.url,
103
+
bl.favicon,
104
+
bl.description,
105
+
bil.listId
106
+
FROM bookmarks b
107
+
JOIN bookmarkLinks bl ON b.id = bl.id
108
+
JOIN bookmarksInLists bil ON b.id = bil.bookmarkId
109
+
WHERE b.type = 'link'
110
+
ORDER BY COALESCE(b.title, bl.title)`,
111
+
returnValue: "resultRows",
112
+
rowMode: "object"
113
+
});
114
+
92
115
bookmarksData=bookmarksInLists;
93
116
94
117
constlistsById={};
@@ -220,9 +243,45 @@ function renderList(list, level = 0) {
0 commit comments