Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit b0be109

Browse files
committed
feat(#64): update how icon deletion happens under the hood
1 parent f584ff8 commit b0be109

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/progman/ui/appdrawer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ def add_icon(self, shortcut: Shortcut) -> None:
2424
def delete_icon(self, icon: AppIcon, shortcut: Shortcut) -> None:
2525
shortcut.tags.remove(self._category)
2626
if not shortcut.tags:
27-
shortcut.tags.append(Tags.HIDDEN.value)
27+
if shortcut.managed_by_user:
28+
self.app_state.shortcuts.remove(shortcut)
29+
else:
30+
shortcut.managed_by_user = True
31+
shortcut.tags.append(Tags.HIDDEN.value)
2832
self._icons.remove(icon)
2933
icon.destroy()
3034
self._arrange_icons()

0 commit comments

Comments
 (0)