mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-18 03:48:09 +00:00
Revert receiving time message ordering and fix crashes on wasapi.
This commit is contained in:
parent
889656fa94
commit
b36b90eba6
4 changed files with 12 additions and 17 deletions
|
|
@ -13,6 +13,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Crash on exit.
|
||||
- Memory stability.
|
||||
|
||||
## 4.4.4 - 2022-06-01
|
||||
|
||||
### Fixed
|
||||
- Revert ordering messages from receiving time.
|
||||
- Some crashes on Wasapi.
|
||||
- Update SDK to 5.1.41
|
||||
|
||||
## 4.4.3 - 2022-05-30
|
||||
|
||||
### Fixed
|
||||
|
|
|
|||
|
|
@ -139,11 +139,8 @@ ChatMessageModel::ChatMessageModel ( std::shared_ptr<linphone::ChatMessage> chat
|
|||
txt += content->getUtf8Text().c_str();
|
||||
}
|
||||
mContent = txt;
|
||||
auto appData = AppDataManager(QString::fromStdString(getChatMessage()->getAppdata()));
|
||||
if(appData.mData.contains("timestamp"))
|
||||
mTimestamp = QDateTime::fromMSecsSinceEpoch(appData.mData["timestamp"].toLongLong());
|
||||
else
|
||||
mTimestamp = QDateTime::fromMSecsSinceEpoch(chatMessage->getTime() * 1000);
|
||||
|
||||
mTimestamp = QDateTime::fromMSecsSinceEpoch(chatMessage->getTime() * 1000);
|
||||
}
|
||||
mWasDownloaded = false;
|
||||
|
||||
|
|
@ -271,12 +268,6 @@ void ChatMessageModel::setWasDownloaded(bool wasDownloaded){
|
|||
|
||||
void ChatMessageModel::setTimestamp(const QDateTime& timestamp) {
|
||||
mTimestamp = timestamp;
|
||||
auto timeT = timestamp.toMSecsSinceEpoch();
|
||||
auto appData = AppDataManager(QString::fromStdString(getChatMessage()->getAppdata()));
|
||||
if(appData.mData["timestamp"].toLongLong() != timeT) {
|
||||
appData.mData["timestamp"] = QString::number(timeT);
|
||||
getChatMessage()->setAppdata(appData.toString().toStdString());
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1277,11 +1277,8 @@ void ChatRoomModel::onNewEvent(const std::shared_ptr<linphone::ChatRoom> & chatR
|
|||
void ChatRoomModel::onChatMessageReceived(const std::shared_ptr<linphone::ChatRoom> & chatRoom, const std::shared_ptr<const linphone::EventLog> & eventLog) {
|
||||
auto message = eventLog->getChatMessage();
|
||||
if(message){
|
||||
auto messageModel = insertMessageAtEnd(message);
|
||||
if(messageModel){
|
||||
messageModel->setTimestamp();
|
||||
updateLastUpdateTime();
|
||||
}
|
||||
insertMessageAtEnd(message);
|
||||
updateLastUpdateTime();
|
||||
emit messageReceived(message);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit b4e189b0ba02138c268bad1030f6c9ebd72f1f29
|
||||
Subproject commit 5d6c9b7fbeefee625027c750cd796a682f2c97ba
|
||||
Loading…
Add table
Reference in a new issue