]> git.0d.be Git - empathy.git/commitdiff
Correctly remember the contact who sent last message.
authorXavier Claessens <xclaesse@gmail.com>
Sun, 20 May 2007 15:20:32 +0000 (15:20 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Sun, 20 May 2007 15:20:32 +0000 (15:20 +0000)
2007-05-20  Xavier Claessens  <xclaesse@gmail.com>

* libempathy-gtk/gossip-chat-view.c: Correctly remember the contact
who sent last message.

svn path=/trunk/; revision=86

ChangeLog
libempathy-gtk/gossip-chat-view.c

index 00a97bd47965210df6e454d51f201ed47c3bb09e..d52c2ac00d2829dff31065f6de7736e697600682 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-20  Xavier Claessens  <xclaesse@gmail.com>
+
+       * libempathy-gtk/gossip-chat-view.c: Correctly remember the contact
+       who sent last message.
+
 2007-05-20  Xavier Claessens  <xclaesse@gmail.com>
 
        * libempathy-gtk/gossip-chat-view.c: Correctly remember if last message
index b9d2d4b51526ba5c179fc6fe31c6da9be2316d97..24770f5ded9aa11af081d44875544da7587dc190 100644 (file)
@@ -1472,16 +1472,17 @@ gossip_chat_view_append_message (GossipChatView *view,
 
        my_contact = gossip_contact_get_user (sender);
 
+       /* Reset the last inserted contact. */
+       if (priv->last_contact) {
+               g_object_unref (priv->last_contact);
+       }
+
        if (gossip_contact_equal (my_contact, sender)) {
                priv->last_block_type = BLOCK_TYPE_SELF;
+               priv->last_contact = NULL;
        } else {
                priv->last_block_type = BLOCK_TYPE_OTHER;
-       }
-
-       /* Reset the last inserted contact, since it was from self. */
-       if (priv->last_contact) {
-               g_object_unref (priv->last_contact);
-               priv->last_contact = NULL;
+               priv->last_contact = g_object_ref (sender);
        }
 
        if (scroll_down) {