diff options
author | Wilmer van der Gaast <wilmer@google.com> | 2010-07-30 15:28:22 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@google.com> | 2010-07-30 15:28:22 +0100 |
commit | 8b6146945853c38723b3e80ce08fc1bd78a34189 (patch) | |
tree | c7227998d130ceaf43d2f5804c956176ac99e7e5 | |
parent | b9256662a7ef5660b35ba51bdc8d798befb871f0 (diff) |
Don't notify the UI about group changes if there wasn't, in fact, a change.
This should stop the odd left+joins that were happening sometimes.
-rw-r--r-- | protocols/nogaim.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/protocols/nogaim.c b/protocols/nogaim.c index d8c7d05a..c14b222d 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -381,13 +381,15 @@ void imcb_add_buddy( struct im_connection *ic, const char *handle, const char *g { bee_user_t *bu; bee_t *bee = ic->bee; + bee_group_t *oldg; if( !( bu = bee_user_by_handle( bee, ic, handle ) ) ) bu = bee_user_new( bee, ic, handle, 0 ); + oldg = bu->group; bu->group = bee_group_by_name( bee, group, TRUE ); - if( bee->ui->user_group ) + if( bee->ui->user_group && bu->group != oldg ) bee->ui->user_group( bee, bu ); } |