From: Ed Page Date: Sat, 3 Oct 2009 23:16:42 +0000 (-0500) Subject: Forcing an initial announcing of existing contacts X-Git-Url: http://git.maemo.org/git/?p=theonering;a=commitdiff_plain;h=c7d9d98acf3a02b6f094a952105e858d2bd425ad Forcing an initial announcing of existing contacts --- diff --git a/src/channel/contact_list.py b/src/channel/contact_list.py index b51a050..301e95b 100644 --- a/src/channel/contact_list.py +++ b/src/channel/contact_list.py @@ -35,6 +35,10 @@ class AllContactsListChannel(AbstractListChannel): ) self.GroupFlagsChanged(0, 0) + addressbook = connection.session.addressbook + contacts = addressbook.get_contacts() + self._process_refresh(addressbook, contacts, []) + @coroutines.func_sink @coroutines.expand_positional @gobject_utils.async @@ -45,6 +49,9 @@ class AllContactsListChannel(AbstractListChannel): @todo This currently does not handle people with multiple phone numbers, yay that'll be annoying to resolve """ + self._process_refresh(addressbook, added, removed) + + def _process_refresh(self, addressbook, added, removed): connection = self._conn handlesAdded = [ handle.create_handle(connection, "contact", contactId)