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

Commit f80ae94

Browse files
committed
feat: improve icon removal
1 parent 5b8bddb commit f80ae94

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: src/progman/ui/appdrawer.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,15 @@ 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-
if shortcut.managed_by_user:
27+
if shortcut.managed_by_user and shortcut.link_path:
28+
shortcut.tags.append(Tags.HIDDEN.value)
29+
self.app_state.groups[Tags.HIDDEN.value].append(shortcut)
30+
elif shortcut.managed_by_user:
2831
self.app_state.shortcuts.remove(shortcut)
2932
else:
3033
shortcut.managed_by_user = True
3134
shortcut.tags.append(Tags.HIDDEN.value)
35+
self.app_state.groups[Tags.HIDDEN.value].append(shortcut)
3236
self._icons.remove(icon)
3337
icon.destroy()
3438
self._arrange_icons()

0 commit comments

Comments
 (0)