Philipp Hörist pushed to branch master at gajim / gajim
Commits:
37363790 by lovetox at 2022-05-25T00:15:20+02:00
fix: Roster: Sort DND last
Fixes #10898
- - - - -
1 changed file:
- gajim/gtk/roster.py
Changes:
=====================================
gajim/gtk/roster.py
=====================================
@@ -30,6 +30,7 @@
from gi.repository import Gtk
from nbxmpp import JID
+from nbxmpp.const import PresenceShow
from nbxmpp.namespaces import Namespace
from gajim.common import app
@@ -762,6 +763,10 @@ def _tree_compare_iters(self,
contact2 = self._get_contact(model[iter2][Column.JID_OR_GROUP])
if contact1.show != contact2.show:
+ if contact1.show == PresenceShow.DND:
+ return 1
+ if contact2.show == PresenceShow.DND:
+ return -1
return -1 if contact1.show > contact2.show else 1
return locale.strcoll(name1.lower(), name2.lower())
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/3736379032cf1db6cbc5471de1dfd2c32e681d24
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/3736379032cf1db6cbc5471de1dfd2c32e681d24
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