From: Philip Withnall Date: Wed, 30 Jun 2010 10:47:42 +0000 (+0100) Subject: Only warn about unknown personas if the account is already connected X-Git-Tag: FOLKS_0_1_9~54 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=891f458a1a29463c12076395ae8d0ae8fd90ff25;p=platform%2Fupstream%2Ffolks.git Only warn about unknown personas if the account is already connected This fixes spew of "unknown persona in favourites list" messages on startup. --- diff --git a/backends/telepathy/tpf-persona-store.vala b/backends/telepathy/tpf-persona-store.vala index 84d6a85..263ca32 100644 --- a/backends/telepathy/tpf-persona-store.vala +++ b/backends/telepathy/tpf-persona-store.vala @@ -190,14 +190,20 @@ public class Tpf.PersonaStore : Folks.PersonaStore else this.favourite_handles.remove (h); - if (p == null) + /* If the persona isn't in the handle_persona_map yet, it's most + * likely because the account hasn't connected yet (and we haven't + * received the roster). If there are already entries in + * handle_persona_map, the account *is* connected and we should + * warn about the unknown persona. */ + if (p == null && this.handle_persona_map.size > 0) { warning ("unknown persona '%s' in favourites list", ids[i]); continue; } /* Mark or unmark the persona as a favourite */ - p.is_favourite = add; + if (p != null) + p.is_favourite = add; } }