mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix(chatlog): update timestamp when db is slower than ack
* cannot invoke non-slot function
This commit is contained in:
parent
5f40ed8d8c
commit
ca397aebbf
|
@ -154,7 +154,7 @@ void OfflineMsgEngine::completeMessage(QMap<ReceiptNum, Message>::iterator msgIt
|
||||||
if (QThread::currentThread() == QCoreApplication::instance()->thread()) {
|
if (QThread::currentThread() == QCoreApplication::instance()->thread()) {
|
||||||
updateTimestamp(msgIt->chatMessage);
|
updateTimestamp(msgIt->chatMessage);
|
||||||
} else {
|
} else {
|
||||||
QMetaObject::invokeMethod(this, "updateTimestamp", Qt::QueuedConnection, Q_ARG(ChatMessage::Ptr, msgIt->chatMessage));
|
QMetaObject::invokeMethod(this, "updateTimestamp", Qt::BlockingQueuedConnection, Q_ARG(ChatMessage::Ptr, msgIt->chatMessage));
|
||||||
}
|
}
|
||||||
sentSavedMessages.erase(msgIt);
|
sentSavedMessages.erase(msgIt);
|
||||||
receivedReceipts.removeOne(msgIt.key());
|
receivedReceipts.removeOne(msgIt.key());
|
||||||
|
|
|
@ -57,8 +57,10 @@ private:
|
||||||
private slots:
|
private slots:
|
||||||
void completeMessage(QMap<ReceiptNum, Message>::iterator msgIt);
|
void completeMessage(QMap<ReceiptNum, Message>::iterator msgIt);
|
||||||
|
|
||||||
private:
|
private slots:
|
||||||
void updateTimestamp(ChatMessage::Ptr msg);
|
void updateTimestamp(ChatMessage::Ptr msg);
|
||||||
|
|
||||||
|
private:
|
||||||
void checkForCompleteMessages(ReceiptNum receipt);
|
void checkForCompleteMessages(ReceiptNum receipt);
|
||||||
|
|
||||||
QMutex mutex;
|
QMutex mutex;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user