From: Florian Zeitz Date: Sat, 16 Feb 2013 13:20:33 +0000 (+0100) Subject: Consistently treat no groups as group "General" X-Git-Url: http://cgit.babelmonkeys.de/?p=jubjub.git;a=commitdiff_plain;h=ac24f40fcae2a1e7fc44d36e5f8448ec1cbe4120 Consistently treat no groups as group "General" --- diff --git a/src/gui/gtk/JubGtkRosterUI.m b/src/gui/gtk/JubGtkRosterUI.m index 99e5144..a742ba3 100644 --- a/src/gui/gtk/JubGtkRosterUI.m +++ b/src/gui/gtk/JubGtkRosterUI.m @@ -350,8 +350,12 @@ static gboolean filter_roster_by_presence(GtkTreeModel *model, GtkTreeRowReference *ref; OFString *bareJID = [contact.rosterItem.JID bareJID]; OFMapTable *contactRows = [_contactMap objectForKey: bareJID]; + OFArray *groups = contact.rosterItem.groups;; - for (OFString *group in contact.rosterItem.groups) { + if (groups == nil) + groups = @[ @"General" ]; + + for (OFString *group in groups) { ref = [contactRows valueForKey: group]; path = gtk_tree_row_reference_get_path(ref); gtk_tree_model_get_iter(GTK_TREE_MODEL(_roster_model),