1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

feat(offlinemsg): Enable offline messages with no history

This commit is contained in:
Mick Sayson 2019-05-25 15:03:30 -07:00
parent e5016337bb
commit 2283d0c1b0

View File

@ -1192,7 +1192,14 @@ void ChatForm::SendMessageStr(QString msg)
}
});
} else {
ma->markAsSent(QDateTime::currentDateTime());
if (messageSent) {
offlineEngine->addSentMessage(receipt, modelMsg,
[ma] { ma->markAsSent(QDateTime::currentDateTime()); });
} else {
offlineEngine->addUnsentMessage(modelMsg, [ma] {
ma->markAsSent(QDateTime::currentDateTime());
});
}
}
// set last message only when sending it