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()); } /**