Add contact if it's new
authorSergio Villar Senin <svillar@igalia.com>
Wed, 14 Jan 2009 11:53:48 +0000 (11:53 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Wed, 14 Jan 2009 11:53:48 +0000 (11:53 +0000)
pmo-trunk-r7144

src/hildon2/modest-address-book.c

index 7377e4e..d669b37 100644 (file)
@@ -375,7 +375,10 @@ commit_contact(EContact * contact, gboolean is_new)
        if (OSSO_ABOOK_IS_CONTACT (contact)) {
                osso_abook_contact_commit(OSSO_ABOOK_CONTACT(contact), is_new, book, NULL);
        } else {
-               e_book_commit_contact (book, contact, NULL);
+               if (is_new)
+                       e_book_add_contact (book, contact, NULL);
+               else
+                       e_book_commit_contact (book, contact, NULL);
        }
 #endif /* MODEST_ABOOK_API < 2 */
 }