From 129e7e6de39c330074a3f26dcbf09301ab74325b Mon Sep 17 00:00:00 2001 From: Travis Reitter Date: Thu, 1 Jul 2010 14:47:10 -0700 Subject: [PATCH] When removing Tpf.Personas from the store, ensure we empty corresponding entries for the persona's handle. --- backends/telepathy/tpf-persona-store.vala | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/backends/telepathy/tpf-persona-store.vala b/backends/telepathy/tpf-persona-store.vala index fcc9dac..4021657 100644 --- a/backends/telepathy/tpf-persona-store.vala +++ b/backends/telepathy/tpf-persona-store.vala @@ -497,15 +497,26 @@ public class Tpf.PersonaStore : Folks.PersonaStore return; } - var persona = this.handle_persona_map[handle]; - this.ignore_persona (persona); + this.ignore_by_handle (handle); } - private void ignore_persona (Tpf.Persona? persona) + private void ignore_by_handle (uint handle) { + var persona = this.handle_persona_map[handle]; + + /* + * remove all handle-keyed entries + */ + this.handle_persona_map.remove (handle); + + /* skip channel_group_incoming_adds because they occurred after removal */ + if (persona == null) return; + /* + * remove all persona-keyed entries + */ foreach (var entry in this.channel_group_incoming_adds) { var channel = (Channel) entry.key; -- 2.7.4