[empathy: 18/19] Only decrement unread_messages if it's not an edited message



commit 4f4c33a6cab809bae137b9141e0c1697f951e9ec
Author: Danielle Madeley <danielle madeley collabora co uk>
Date:   Mon Jun 13 17:00:06 2011 +0100

    Only decrement unread_messages if it's not an edited message
    
    Prevents ending up with message counts of -1

 libempathy-gtk/empathy-chat.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 5cee9eb..ecf849a 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1384,8 +1384,10 @@ chat_message_acknowledged_cb (EmpathyTpChat  *tp_chat,
 	empathy_chat_view_message_acknowledged (chat->view,
 	    message);
 
-	priv->unread_messages--;
-	g_object_notify (G_OBJECT (chat), "nb-unread-messages");
+	if (!empathy_message_is_edit (message)) {
+		priv->unread_messages--;
+		g_object_notify (G_OBJECT (chat), "nb-unread-messages");
+	}
 }
 
 static void



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