1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
This commit is contained in:
krepa098 2015-02-16 16:48:22 +01:00
parent c631fff602
commit deb8440c6a
3 changed files with 3 additions and 1 deletions

View File

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

View File

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

View File

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