core: Split details table code out of IA.link_personas()
authorPhilip Withnall <philip@tecnocode.co.uk>
Mon, 7 May 2012 22:59:56 +0000 (23:59 +0100)
committerPhilip Withnall <philip@tecnocode.co.uk>
Sat, 7 Jul 2012 15:59:07 +0000 (16:59 +0100)
Helps: https://bugzilla.gnome.org/show_bug.cgi?id=629537

folks/individual-aggregator.vala

index 2c86ba8..f38dead 100644 (file)
@@ -1792,6 +1792,15 @@ public class Folks.IndividualAggregator : Object
       assert (((!) this._primary_store).type_id ==
           this._configured_primary_store_type_id);
 
+      var details = this._build_linking_details (personas);
+
+      yield this.add_persona_from_details (null,
+          (!) this._primary_store, details);
+    }
+
+  private HashTable<string, Value?> _build_linking_details (
+      Set<Persona> personas)
+    {
       /* `protocols_addrs_set` will be passed to the new Kf.Persona */
       var protocols_addrs_set = new HashMultiMap<string, ImFieldDetails> (
             null, null,
@@ -1878,8 +1887,7 @@ public class Folks.IndividualAggregator : Object
               local_ids_value);
         }
 
-      yield this.add_persona_from_details (null,
-          (!) this._primary_store, details);
+      return details;
     }
 
   /**