Philipp Hörist pushed to branch master at gajim / gajim
Commits:
b10e13cc by Philipp Hörist at 2023-04-21T20:35:56+02:00
fix: Make manually changing the pinned chat sort order work again
- - - - -
1 changed file:
- gajim/gtk/chat_list.py
Changes:
=====================================
gajim/gtk/chat_list.py
=====================================
@@ -72,6 +72,7 @@ def __init__(self, workspace_id: str) -> None:
self._set_placeholder()
self._mouseover: bool = False
+ self._pinned_order_change = False
self.connect('enter-notify-event', self._on_mouse_focus_changed)
self.connect('leave-notify-event', self._on_mouse_focus_changed)
@@ -434,7 +435,9 @@ def _change_pinned_order(self, row_before:
Optional[ChatListRow]) -> None:
row.position = self._chat_order.index(row)
self.emit('chat-order-changed')
+ self._pinned_order_change = True
self.invalidate_sort()
+ self._pinned_order_change = False
def _update_time(self) -> bool:
for _key, row in self._chats.items():
@@ -474,7 +477,7 @@ def _header_func(row: ChatListRow, before: ChatListRow |
None) -> None:
row.set_header_type(None)
def _sort_func(self, row1: ChatListRow, row2: ChatListRow) -> int:
- if self._mouseover:
+ if self._mouseover and not self._pinned_order_change:
log.debug('Mouseover active, don’t sort rows')
return 0
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/b10e13cc21d904b518454d72a19068d8980915ad
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/b10e13cc21d904b518454d72a19068d8980915ad
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits