move the previous code in send_chatstate

This commit is contained in:
Nikos Kouremenos 2005-07-19 23:05:30 +00:00
parent 97d918d83d
commit b566a9a0db
1 changed files with 4 additions and 3 deletions

View File

@ -321,9 +321,6 @@ class TabbedChatWindow(chat.Chat):
if current_state == False: # he doesn't support chatstates if current_state == False: # he doesn't support chatstates
return False # stop looping return False # stop looping
# if we're inactive prevent paused (inactive is stronger)
if current_state = 'inactive':
return True
print 'mouse', self.mouse_over_in_last_5_secs print 'mouse', self.mouse_over_in_last_5_secs
print 'kbd', self.kbd_activity_in_last_5_secs print 'kbd', self.kbd_activity_in_last_5_secs
@ -454,6 +451,10 @@ class TabbedChatWindow(chat.Chat):
if self.chatstates[jid] == 'composing' and state == 'active': if self.chatstates[jid] == 'composing' and state == 'active':
return return
# if we're inactive prevent paused (inactive is stronger)
if self.chatstates[jid] == = 'inactive' and state == 'paused':
return True
self.chatstates[jid] = state self.chatstates[jid] = state
gajim.connections[self.account].send_message(jid, None, None, gajim.connections[self.account].send_message(jid, None, None,
chatstate = state) chatstate = state)