[empathy] chat_text_maybe_append_date_and_time: compute the right delta between timestamps



commit 4651fb354e601f34dc9df08f2b506f765e455ead
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Mon Aug 1 13:10:35 2011 +0200

    chat_text_maybe_append_date_and_time: compute the right delta between timestamps
    
    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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-chat-text-view.c b/libempathy-gtk/empathy-chat-text-view.c
index 18d1296..2489994 100644
--- a/libempathy-gtk/empathy-chat-text-view.c
+++ b/libempathy-gtk/empathy-chat-text-view.c
@@ -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;



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