Skip to content

Commit

Permalink
fix(workspaces): update button state after adding workspace button
Browse files Browse the repository at this point in the history
Updated the button state in the WorkspaceWidget class to ensure that the button reflects the latest changes immediately after a new workspace button is added. This change enhances user experience by providing real-time feedback on the workspace buttons.
  • Loading branch information
amnweb committed Sep 3, 2024
1 parent d02b023 commit 2301862
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/widgets/komorebi/workspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ def _add_or_update_buttons(self) -> None:
except IndexError:
button = self._try_add_workspace_button(workspace_index)
buttons_added = True
self._update_button(button)

if buttons_added:
self._workspace_buttons.sort(key=lambda btn: btn.workspace_index)
self._clear_container_layout()
Expand Down

0 comments on commit 2301862

Please sign in to comment.