[evolution-data-server/openismus-work-master: 2/8] Fixed addressbook code run properly without the E_BOOK_CLIENT_VIEW_NOTIFY_INITIAL flag set.



commit fa362ae902a691beb925ff7b9204f6b5d33b84b8
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Fri Jun 24 21:48:27 2011 -0400

    Fixed addressbook code run properly without the E_BOOK_CLIENT_VIEW_NOTIFY_INITIAL flag set.
    
    It seems we were indeed sending all the initial notifications in a bundle
    at 'complete' time, this patch adjusts the code to not accumulate the
    notifications but to only mark the contacts as valid in the id table.

 addressbook/libedata-book/e-data-book-view.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/addressbook/libedata-book/e-data-book-view.c b/addressbook/libedata-book/e-data-book-view.c
index 0db38f3..f38ad42 100644
--- a/addressbook/libedata-book/e-data-book-view.c
+++ b/addressbook/libedata-book/e-data-book-view.c
@@ -281,14 +281,15 @@ notify_add (EDataBookView *view, const gchar *id, const gchar *vcard)
 		if (priv->adds->len == THRESHOLD_ITEMS) {
 			send_pending_adds (view);
 		}
+
+		utf8_vcard = e_util_utf8_make_valid (vcard);
+		g_array_append_val (priv->adds, utf8_vcard);
+
+		ensure_pending_flush_timeout (view);
 	}
 
-	utf8_vcard = e_util_utf8_make_valid (vcard);
-	g_array_append_val (priv->adds, utf8_vcard);
 	g_hash_table_insert (priv->ids, e_util_utf8_make_valid (id),
 			     GUINT_TO_POINTER (1));
-
-	ensure_pending_flush_timeout (view);
 }
 
 static gboolean



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]