Philipp Hörist pushed to branch reactions at gajim / gajim
Commits:
14616ca1 by Philipp Hörist at 2024-05-19T08:58:46+02:00
refactor: Fix small things
- - - - -
2 changed files:
- gajim/gtk/conversation/reactions_bar.py
- gajim/gtk/conversation/rows/message.py
Changes:
=====================================
gajim/gtk/conversation/reactions_bar.py
=====================================
@@ -243,6 +243,9 @@ def _on_insert_text(
) -> int:
entry.stop_emission_by_name('insert-text')
entry.hide()
+
+ # Remove emoji variant selectors
+ text = text.strip('\uFE0E\uFE0F')
if text:
self.emit('emoji-added', text)
return 0
=====================================
gajim/gtk/conversation/rows/message.py
=====================================
@@ -473,10 +473,7 @@ def send_reaction(self, emoji: str, toggle: bool = True)
-> None:
log.warning('No reaction id')
return
- # Remove emoji variant selectors
- emoji = emoji.strip('\uFE0E\uFE0F')
-
- our_reactions = self.get_our_reactions()
+ our_reactions = self._reactions_bar.get_our_reactions()
if emoji in our_reactions and not toggle:
log.info('Not toggling reaction <%s>', emoji)
return
@@ -491,9 +488,6 @@ def send_reaction(self, emoji: str, toggle: bool = True) ->
None:
contact=self._contact, reaction_id=reaction_id,
reactions=our_reactions
)
- def get_our_reactions(self) -> set[str]:
- return self._reactions_bar.get_our_reactions()
-
def set_retracted(self, text: str) -> None:
self.text = text
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/14616ca1d9576f9d5cd1a9d3cc84b7ea6ee106c4
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/14616ca1d9576f9d5cd1a9d3cc84b7ea6ee106c4
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]