From 0030f69cee6e81301e332d75a16c923aa8d33401 Mon Sep 17 00:00:00 2001 From: Damian Minkov Date: Mon, 9 Jul 2012 15:43:29 +0000 Subject: [PATCH] Fixes showing today's messages in history window. --- .../impl/gui/main/chat/history/HistoryWindow.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/history/HistoryWindow.java b/src/net/java/sip/communicator/impl/gui/main/chat/history/HistoryWindow.java index 871856483..0a109b643 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/history/HistoryWindow.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/history/HistoryWindow.java @@ -389,6 +389,8 @@ protected void windowClosing(WindowEvent e) /** * Returns the next date from the history. + * When date is the last one, we return the current date, + * means we are loading today messages (till now). * * @param date The date which indicates where to start. * @return the date after the given date @@ -408,8 +410,7 @@ public Date getNextDateFromHistory(Date date) } } - long ts = System.currentTimeMillis(); - return new Date(ts - ts % (24*60*60*1000)); + return new Date(System.currentTimeMillis()); } /**