Skip to content

Commit 77edd2b

Browse files
committed
fix(BookmarksTree): Allow syncing root folder in chrome again
Signed-off-by: Marcel Klehr <[email protected]>
1 parent 573a537 commit 77edd2b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/lib/browser/BrowserTree.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default class BrowserTree implements IResource<typeof ItemLocation.LOCAL>
4848
const allAccounts = await (await Account.getAccountClass()).getAllAccounts()
4949

5050
const recurse = (node, parentId?, isOnToolbar?, rng?) => {
51-
51+
5252
if (
5353
allAccounts.some(
5454
acc => acc.getData().localRoot === node.id && String(node.id) !== String(this.rootId) && !acc.getData().nestedSync
@@ -73,6 +73,18 @@ export default class BrowserTree implements IResource<typeof ItemLocation.LOCAL>
7373
case 'mobile______': // Firefox
7474
overrideTitle = BrowserTree.TITLE_MOBILE_BOOKMARKS
7575
}
76+
if ('folderType' in node) {
77+
// Chromium since 138.0.7196.0
78+
switch (node.folderType) {
79+
case 'bookmarks-bar':
80+
overrideTitle = BrowserTree.TITLE_BOOKMARKS_BAR
81+
isToolbar = true
82+
break
83+
case 'other':
84+
overrideTitle = BrowserTree.TITLE_OTHER_BOOKMARKS
85+
break
86+
}
87+
}
7688
if (overrideTitle) {
7789
Logger.log(
7890
'Overriding title of built-in node',

0 commit comments

Comments
 (0)