Browse Source

fix issue #1181

pull/1209/head
krepa098 12 years ago
parent
commit
deb8440c6a
  1. 2
      src/widget/form/chatform.cpp
  2. 1
      src/widget/form/genericchatform.cpp
  3. 1
      src/widget/form/genericchatform.h

2
src/widget/form/chatform.cpp

@ -753,7 +753,7 @@ void ChatForm::onAvatarRemoved(int FriendId) @@ -753,7 +753,7 @@ void ChatForm::onAvatarRemoved(int FriendId)
void ChatForm::loadHistory(QDateTime since, bool processUndelivered)
{
QDateTime now = QDateTime::currentDateTime();
QDateTime now = historyBaselineDate.addMSecs(-1);
if (since > now)
return;

1
src/widget/form/genericchatform.cpp

@ -331,6 +331,7 @@ void GenericChatForm::clearChatArea(bool notinform) @@ -331,6 +331,7 @@ void GenericChatForm::clearChatArea(bool notinform)
addSystemInfoMessage(tr("Cleared"), ChatMessage::INFO, QDateTime::currentDateTime());
earliestMessage = QDateTime(); //null
historyBaselineDate = QDateTime::currentDateTime();
emit chatAreaCleared();
}

1
src/widget/form/genericchatform.h

@ -91,6 +91,7 @@ protected: @@ -91,6 +91,7 @@ protected:
QPushButton *sendButton;
ChatLog *chatWidget;
QDateTime earliestMessage;
QDateTime historyBaselineDate = QDateTime::currentDateTime(); // used by HistoryKeeper to load messages from t to historyBaselineDate (excluded)
bool audioInputFlag;
bool audioOutputFlag;
};

Loading…
Cancel
Save