[empathy] empathy-chat: show pending messages only for the first set of logs



commit fba3739d9dccb9ccaa99d5ad8d07c5264ebbdeb2
Author: Debarshi Ray <debarshir src gnome org>
Date:   Mon Jul 9 17:45:01 2012 +0200

    empathy-chat: show pending messages only for the first set of logs
    
    Fixes: https://bugzilla.gnome.org/639877

 libempathy-gtk/empathy-chat.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index e9a914f..1c0e11a 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -2635,10 +2635,6 @@ got_filtered_messages_cb (GObject *walker,
 	g_list_free (messages);
 
 out:
-	/* in case of TPL error, skip backlog and show pending messages */
-	priv->can_show_pending = TRUE;
-	show_pending_messages (chat);
-
 	/* FIXME: See Bug#610994, we are forcing the ACK of the queue. See comments
 	 * about it in EmpathyChatPriv definition */
 	priv->retrieving_backlogs = FALSE;
@@ -2655,6 +2651,11 @@ out:
 	 */
 	if (G_UNLIKELY (!priv->watch_scroll &&
 			!tpl_log_walker_is_end (priv->log_walker))) {
+		/* The pending messages need not be shown after the
+		 * first batch of logs have been displayed */
+		priv->can_show_pending = TRUE;
+		show_pending_messages (chat);
+
 		priv->watch_scroll = TRUE;
 		g_idle_add_full (G_PRIORITY_LOW, chat_scrollable_connect,
 		    g_object_ref (chat), g_object_unref);



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