Skip to content

Commit 6663a47

Browse files
committed
no-bug - Fixed restoring pinned tabs having the wrong favicon, c=tabs, t=fix
1 parent c654c3f commit 6663a47

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/zen/tabs/ZenPinnedTabManager.mjs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@
624624
// Remove everything except the entry we want to keep
625625
state.entries = [state.entries[foundEntryIndex]];
626626
}
627-
state.image = pin.iconUrl || null;
627+
state.image ||= pin.iconUrl || null;
628628
state.index = 0;
629629

630630
SessionStore.setTabState(tab, state);
@@ -765,19 +765,6 @@
765765
document.getElementById('context_pinTab')?.before(element);
766766
}
767767

768-
// TODO: remove this as it's not possible to know the base pinned url any more as it's now stored in tab state
769-
resetPinnedTabData(tabData) {
770-
if (
771-
lazy.zenPinnedTabRestorePinnedTabsToPinnedUrl &&
772-
tabData.pinned &&
773-
tabData.zenPinnedEntry
774-
) {
775-
tabData.entries = [JSON.parse(tabData.zenPinnedEntry)];
776-
tabData.image = tabData.zenPinnedIcon;
777-
tabData.index = 0;
778-
}
779-
}
780-
781768
updatePinnedTabContextMenu(contextTab) {
782769
if (!this.enabled) {
783770
document.getElementById('context_pinTab').hidden = true;

0 commit comments

Comments
 (0)