Fix #3056 (send inactive chatstate when leaving a tab)
This commit is contained in:
parent
7592aebcdc
commit
156cfb5546
3 changed files with 3 additions and 6 deletions
|
@ -324,9 +324,7 @@ class ConversationTab(OneToOneTab):
|
||||||
self.state = 'normal'
|
self.state = 'normal'
|
||||||
self.text_win.remove_line_separator()
|
self.text_win.remove_line_separator()
|
||||||
self.text_win.add_line_separator(self._text_buffer)
|
self.text_win.add_line_separator(self._text_buffer)
|
||||||
if (config.get_by_tabname('send_chat_states', self.general_jid)
|
if config.get_by_tabname('send_chat_states', self.general_jid):
|
||||||
and (not self.input.get_text()
|
|
||||||
or not self.input.get_text().startswith('//'))):
|
|
||||||
if resource:
|
if resource:
|
||||||
self.send_chat_state('inactive')
|
self.send_chat_state('inactive')
|
||||||
self.check_scrolled()
|
self.check_scrolled()
|
||||||
|
|
|
@ -1035,8 +1035,7 @@ class MucTab(ChatTab):
|
||||||
self.state = 'disconnected'
|
self.state = 'disconnected'
|
||||||
self.text_win.remove_line_separator()
|
self.text_win.remove_line_separator()
|
||||||
self.text_win.add_line_separator(self._text_buffer)
|
self.text_win.add_line_separator(self._text_buffer)
|
||||||
if (config.get_by_tabname('send_chat_states', self.general_jid) and
|
if config.get_by_tabname('send_chat_states', self.general_jid):
|
||||||
not self.input.get_text()):
|
|
||||||
self.send_chat_state('inactive')
|
self.send_chat_state('inactive')
|
||||||
self.check_scrolled()
|
self.check_scrolled()
|
||||||
|
|
||||||
|
|
|
@ -280,7 +280,7 @@ class PrivateTab(OneToOneTab):
|
||||||
self.text_win.add_line_separator(self._text_buffer)
|
self.text_win.add_line_separator(self._text_buffer)
|
||||||
tab = self.core.get_tab_by_name(safeJID(self.name).bare, MucTab)
|
tab = self.core.get_tab_by_name(safeJID(self.name).bare, MucTab)
|
||||||
if tab and tab.joined and config.get_by_tabname('send_chat_states',
|
if tab and tab.joined and config.get_by_tabname('send_chat_states',
|
||||||
self.general_jid) and not self.input.get_text() and self.on:
|
self.general_jid) and self.on:
|
||||||
self.send_chat_state('inactive')
|
self.send_chat_state('inactive')
|
||||||
self.check_scrolled()
|
self.check_scrolled()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue