mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix issue #1181
This commit is contained in:
parent
c631fff602
commit
deb8440c6a
|
@ -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;
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user