Philipp Hörist pushed to branch master at gajim / gajim
Commits: ea83fa7b by Daniel Brötzmann at 2021-01-16T17:36:59+01:00 AV: Fix closing chat window while in call
- - - - -
1 changed file:
- gajim/chat_control.py
Changes:
===================================== gajim/chat_control.py ===================================== @@ -25,6 +25,7 @@
from typing import ClassVar # pylint: disable=unused-import from typing import Type # pylint: disable=unused-import +from typing import Optional # pylint: disable=unused-import
import os import time @@ -908,7 +909,8 @@ def stop_jingle(self, sid=None, reason=None): if video_sid and sid in (video_sid, None): self.close_jingle_content('video')
- def close_jingle_content(self, jingle_type: str) -> None: + def close_jingle_content(self, jingle_type: str, + shutdown: Optional[bool] = False) -> None: jingle = self.jingle[jingle_type] if not jingle.sid: return @@ -921,9 +923,10 @@ def close_jingle_content(self, jingle_type: str) -> None: if content: session.remove_content(content.creator, content.name)
- jingle.sid = None - jingle.state = JingleState.NULL - jingle.update() + if not shutdown: + jingle.sid = None + jingle.state = JingleState.NULL + jingle.update()
def _on_end_call_clicked(self, _widget): self.close_jingle_content('audio') @@ -1213,7 +1216,7 @@ def shutdown(self): con.get_module('Chatstate').set_chatstate(self.contact, Chatstate.GONE)
for jingle_type in ('audio', 'video'): - self.close_jingle_content(jingle_type) + self.close_jingle_content(jingle_type, shutdown=True) self.jingle.clear()
# disconnect self from session
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/ea83fa7b20d16da7c59288133012439dc...