diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-12-14 19:16:31 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-03-31 16:39:40 +0800 |
commit | a610fd969c0aa9483ef4d575d65ed989bf114cbc (patch) | |
tree | 235c7657d91570f5e7584b1d677e8ef6dcd06df2 /libempathy | |
parent | 8957694686f44c0bad99b2fc4995f198795597ef (diff) | |
download | gsoc2013-empathy-a610fd969c0aa9483ef4d575d65ed989bf114cbc.tar gsoc2013-empathy-a610fd969c0aa9483ef4d575d65ed989bf114cbc.tar.gz gsoc2013-empathy-a610fd969c0aa9483ef4d575d65ed989bf114cbc.tar.bz2 gsoc2013-empathy-a610fd969c0aa9483ef4d575d65ed989bf114cbc.tar.lz gsoc2013-empathy-a610fd969c0aa9483ef4d575d65ed989bf114cbc.tar.xz gsoc2013-empathy-a610fd969c0aa9483ef4d575d65ed989bf114cbc.tar.zst gsoc2013-empathy-a610fd969c0aa9483ef4d575d65ed989bf114cbc.zip |
factor out remove_from_member_if_needed
Call it that way because we are about to add some check before removing a
contact from members.
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-tp-contact-list.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c index 8d88e00d5..646270ddd 100644 --- a/libempathy/empathy-tp-contact-list.c +++ b/libempathy/empathy-tp-contact-list.c @@ -498,6 +498,15 @@ tp_contact_list_remove_handle (EmpathyTpContactList *list, } static void +remove_from_member_if_needed (EmpathyTpContactList *list, + TpHandle handle) +{ + EmpathyTpContactListPriv *priv = GET_PRIV (list); + + tp_contact_list_remove_handle (list, priv->members, handle); +} + +static void tp_contact_list_publish_group_members_changed_cb (TpChannel *channel, gchar *message, GArray *added, @@ -615,8 +624,7 @@ tp_contact_list_subscribe_group_members_changed_cb (TpChannel *channel, /* Those contacts refuse to send us their presence, remove from members. */ for (i = 0; i < removed->len; i++) { - tp_contact_list_remove_handle (list, priv->members, - g_array_index (removed, TpHandle, i)); + remove_from_member_if_needed (list, g_array_index (removed, TpHandle, i)); } /* We want those contacts in our contact list but we don't get their |