re-draw contct in roster after we get offline status. see #3597

This commit is contained in:
Yann Leboulanger 2009-04-05 18:49:43 +00:00
parent 1e5d5ca9a8
commit e749d5941f
1 changed files with 7 additions and 6 deletions

View File

@ -1197,13 +1197,14 @@ class Interface:
win = self.instances[account]['infos'][array[0]]
elif array[0] + '/' + array[1] in self.instances[account]['infos']:
win = self.instances[account]['infos'][array[0] + '/' + array[1]]
c = gajim.contacts.get_contact(account, array[0], array[1])
if c: # c can be none if it's a gc contact
c.last_status_time = time.localtime(time.time() - tim)
if array[3]:
c.status = array[3]
self.roster.draw_contact(c.jid, account) # draw offline status
if win:
c = gajim.contacts.get_contact(account, array[0], array[1])
if c: # c can be none if it's a gc contact
c.last_status_time = time.localtime(time.time() - tim)
if array[3]:
c.status = array[3]
win.set_last_status_time()
win.set_last_status_time()
if self.remote_ctrl:
self.remote_ctrl.raise_signal('LastStatusTime', (account, array))