From e749d5941fbbc3e3cdeb2b7689248415faacf5a2 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 5 Apr 2009 18:49:43 +0000 Subject: [PATCH] re-draw contct in roster after we get offline status. see #3597 --- src/gajim.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/gajim.py b/src/gajim.py index ff75320ec..96c750b4b 100644 --- a/src/gajim.py +++ b/src/gajim.py @@ -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))