From fba3739d9dccb9ccaa99d5ad8d07c5264ebbdeb2 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 9 Jul 2012 17:45:01 +0200 Subject: 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 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libempathy-gtk/empathy-chat.c') diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index e9a914f36..1c0e11a3a 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); -- cgit v1.2.3