]> git.0d.be Git - empathy.git/commitdiff
chat_text_maybe_append_date_and_time: compute the right delta between timestamps
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 1 Aug 2011 11:10:35 +0000 (13:10 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 1 Aug 2011 11:12:11 +0000 (13:12 +0200)
The first argument of g_date_time_difference() should be the older timestamp.

https://bugzilla.gnome.org/show_bug.cgi?id=654958

libempathy-gtk/empathy-chat-text-view.c

index 18d12963e6d636fc9739c8256e1870a640a9b926..24899942712c5b6ffd3879ca023068daf83d3605 100644 (file)
@@ -453,7 +453,7 @@ chat_text_maybe_append_date_and_time (EmpathyChatTextView *view,
        /* Get the date of the message we are appending */
        date = g_date_time_new_from_unix_utc (timestamp);
 
-       delta = g_date_time_difference (last_date, date);
+       delta = g_date_time_difference (date, last_date);
        /* If last message was from another day we append date and time */
        if (delta >= G_TIME_SPAN_DAY) {
                append_date = TRUE;