]> git.0d.be Git - empathy.git/commitdiff
Only decrement unread_messages if it's not an edited message
authorDanielle Madeley <danielle.madeley@collabora.co.uk>
Mon, 13 Jun 2011 16:00:06 +0000 (17:00 +0100)
committerDanielle Madeley <danielle.madeley@collabora.co.uk>
Mon, 13 Jun 2011 16:04:04 +0000 (17:04 +0100)
Prevents ending up with message counts of -1

libempathy-gtk/empathy-chat.c

index 5cee9eb0bb139fd8664b48acea9aa542d8c2e6bf..ecf849aafaa3133dfab681cf3eeb022aa60d0b0f 100644 (file)
@@ -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