mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge branch 'pr2821'
This commit is contained in:
commit
19582c1c69
|
@ -82,7 +82,8 @@ void OfflineMsgEngine::deliverOfflineMsgs()
|
|||
return;
|
||||
|
||||
QMap<int64_t, MsgPtr> msgs = undeliveredMsgs;
|
||||
removeAllReciepts();
|
||||
removeAllReceipts();
|
||||
undeliveredMsgs.clear();
|
||||
|
||||
for (auto iter = msgs.begin(); iter != msgs.end(); ++iter)
|
||||
{
|
||||
|
@ -105,10 +106,9 @@ void OfflineMsgEngine::deliverOfflineMsgs()
|
|||
}
|
||||
}
|
||||
|
||||
void OfflineMsgEngine::removeAllReciepts()
|
||||
void OfflineMsgEngine::removeAllReceipts()
|
||||
{
|
||||
QMutexLocker ml(&mutex);
|
||||
|
||||
receipts.clear();
|
||||
undeliveredMsgs.clear();
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
|
||||
public slots:
|
||||
void deliverOfflineMsgs();
|
||||
void removeAllReciepts();
|
||||
void removeAllReceipts();
|
||||
|
||||
private:
|
||||
struct MsgPtr {
|
||||
|
|
|
@ -110,7 +110,7 @@ ChatForm::ChatForm(Friend* chatFriend)
|
|||
connect(msgEdit, &ChatTextEdit::enterPressed, this, &ChatForm::onSendTriggered);
|
||||
connect(msgEdit, &ChatTextEdit::textChanged, this, &ChatForm::onTextEditChanged);
|
||||
connect(core, &Core::fileSendFailed, this, &ChatForm::onFileSendFailed);
|
||||
connect(this, &ChatForm::chatAreaCleared, getOfflineMsgEngine(), &OfflineMsgEngine::removeAllReciepts);
|
||||
connect(this, &ChatForm::chatAreaCleared, getOfflineMsgEngine(), &OfflineMsgEngine::removeAllReceipts);
|
||||
connect(&typingTimer, &QTimer::timeout, this, [=]{
|
||||
Core::getInstance()->sendTyping(f->getFriendID(), false);
|
||||
isTyping = false;
|
||||
|
|
|
@ -1848,7 +1848,7 @@ void Widget::clearAllReceipts()
|
|||
{
|
||||
QList<Friend*> frnds = FriendList::getAllFriends();
|
||||
for (Friend *f : frnds)
|
||||
f->getChatForm()->getOfflineMsgEngine()->removeAllReciepts();
|
||||
f->getChatForm()->getOfflineMsgEngine()->removeAllReceipts();
|
||||
}
|
||||
|
||||
void Widget::reloadTheme()
|
||||
|
|
Loading…
Reference in New Issue
Block a user