Philipp Hörist pushed to branch master at gajim / gajim
Commits: 526782cc by wurstsalat at 2023-03-09T19:07:36+00:00 fix: Show chat notifications when chat page is not visible Fixes #11416 - - - - - 2 changed files: - gajim/gtk/main.py - gajim/gtk/main_stack.py Changes: ===================================== gajim/gtk/main.py ===================================== @@ -761,6 +761,8 @@ def get_active_workspace(self) -> Optional[str]: def is_chat_active(self, account: str, jid: JID) -> bool: if not self.has_toplevel_focus(): return False + if self._main_stack.get_visible_page_name() != 'chats': + return False return self._chat_page.is_chat_selected(account, jid) def highlight_dnd_targets(self, drag_row: Any, highlight: bool) -> None: ===================================== gajim/gtk/main_stack.py ===================================== @@ -14,6 +14,7 @@ from __future__ import annotations +from typing import Optional from typing import Union from gi.repository import Gtk @@ -56,6 +57,9 @@ def remove_account_page(self, account: str) -> None: def remove_chats_for_account(self, account: str) -> None: self._chat_page.remove_chats_for_account(account) + def get_visible_page_name(self) -> Optional[str]: + return self.get_visible_child_name() + def show_app_page(self) -> None: self.set_visible_child_name('app') View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/526782cc05c7e946afa3a6ee36add654387c9313 -- View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/526782cc05c7e946afa3a6ee36add654387c9313 You're receiving this email because of your account on dev.gajim.org.
_______________________________________________ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits