gh-14470: Fixed wrong data image being used for sync (gh-15048)

This commit is contained in:
mr. m
2026-08-21 09:44:49 +02:00
committed by GitHub
parent 721135f576
commit e66e763e63
2 changed files with 6 additions and 1 deletions

View File

@@ -598,6 +598,11 @@ class nsZenSpacesSyncApplier {
if (icon && syncableIconUrl(tab.getAttribute("image")) !== icon) {
try {
win.gBrowser.setIcon(tab, icon);
// As on creation: an unloaded tab's cached session image would
// otherwise override the icon set above at every collect.
lazy.TabStateCache.update(tab.linkedBrowser.permanentKey, {
image: null,
});
} catch (e) {
console.error("ZenSpacesSync: failed to set tab icon", e);
}

View File

@@ -231,7 +231,7 @@ class nsZenSpacesSyncModel {
if (!url || url === "about:blank") {
return null;
}
const icon = syncableIconUrl(initial?.image || tabData.image || "");
const icon = syncableIconUrl(tabData.image || initial?.image || "");
return { url, title: title || "", icon };
}