From 7e88b7608a8613f2b92af8f5c991c1c22a73ca63 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 31 Jan 2008 20:39:03 +0000 Subject: [PATCH] fix roster sorting whith user that just became offline and are still in roster. Fixes #3531 --- src/roster_window.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/roster_window.py b/src/roster_window.py index 9e4f2a7bb..75f9839b5 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -4933,6 +4933,16 @@ class RosterWindow: show2 = cshow[s] else: show2 = 9 + removing1 = False + removing2 = False + if show1 == 6 and jid1 in gajim.to_be_removed[account1]: + removing1 = True + if show2 == 6 and jid2 in gajim.to_be_removed[account2]: + removing2 = True + if removing1 and not removing2: + return -1 + if removing2 and not removing1: + return 1 if show1 < show2: return -1 elif show1 > show2: