mirror of
https://github.com/zen-browser/desktop.git
synced 2026-03-29 20:01:52 +00: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:
@@ -1085,23 +1085,19 @@ class nsZenWorkspaces {
|
||||
if (hasNoIcon) {
|
||||
anchor.textContent = "";
|
||||
}
|
||||
gZenEmojiPicker
|
||||
.open(anchor)
|
||||
.then(async (emoji) => {
|
||||
gZenEmojiPicker.open(anchor, {
|
||||
closeOnSelect: false,
|
||||
allowNone: hasNoIcon,
|
||||
onSelect: async (icon) => {
|
||||
const workspace = this.getWorkspaceFromId(workspaceId);
|
||||
if (!workspace) {
|
||||
console.warn("No active workspace found to change icon");
|
||||
return;
|
||||
}
|
||||
workspace.icon = emoji;
|
||||
workspace.icon = icon;
|
||||
await this.saveWorkspace(workspace);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.warn("Error changing workspace icon:", error);
|
||||
if (hasNoIcon) {
|
||||
anchor.setAttribute("no-icon", "true");
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
shouldCloseWindow() {
|
||||
|
||||
Reference in New Issue
Block a user