mirror of
https://github.com/zen-browser/desktop
synced 2026-04-26 01:25:02 +02:00
fix: Hide folder icon remove action when no icon is set, b=closes #12401, p=#12481, c=folders, common
Co-authored-by: andre <andre@localhost> Co-authored-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
This commit is contained in:
@@ -504,9 +504,11 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature {
|
||||
});
|
||||
document.getElementById("context_zen-edit-tab-icon").addEventListener("command", () => {
|
||||
const tab = TabContextMenu.contextTab;
|
||||
gZenEmojiPicker
|
||||
.open(tab.iconImage, { emojiAsSVG: true })
|
||||
.then((icon) => {
|
||||
gZenEmojiPicker.open(tab.iconImage, {
|
||||
emojiAsSVG: true,
|
||||
closeOnSelect: false,
|
||||
allowNone: Boolean(tab.zenStaticIcon),
|
||||
onSelect: (icon) => {
|
||||
if (icon) {
|
||||
tab.zenStaticIcon = icon;
|
||||
} else {
|
||||
@@ -516,10 +518,8 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature {
|
||||
lazy.TabStateCache.update(tab.permanentKey, {
|
||||
image: null,
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user