Philipp Hörist pushed to branch master at gajim / gajim


Commits:
b967f87e by Daniel Brötzmann at 2025-07-27T20:05:04+00:00
imprv: Emoji completion: Sort emojis

- - - - -


1 changed file:

- gajim/gtk/completion/emoji.py


Changes:

=====================================
gajim/gtk/completion/emoji.py
=====================================
@@ -8,6 +8,7 @@
 from typing import cast
 from typing import Final
 
+import locale
 import logging
 
 from gi.repository import Gdk
@@ -158,9 +159,17 @@ def parse_emoji_data(bytes_data: GLib.Bytes, loc: str) -> 
Gio.ListStore:
         )
         store.append(item)
 
+    store.sort(_sort_short_name)
     return store
 
 
+@staticmethod
+def _sort_short_name(
+    item1: EmojiCompletionListItem, item2: EmojiCompletionListItem
+) -> int:
+    return locale.strcoll(item1.short_name, item2.short_name)
+
+
 class EmojiCompletionListItem(BaseCompletionListItem, GObject.Object):
     __gtype_name__ = "EmojiCompletionListItem"
 



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/b967f87e527c20917ad1d63c953e40c922a18ccd

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/b967f87e527c20917ad1d63c953e40c922a18ccd
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to