Commit 4ece007e authored by Ronan's avatar Ronan
Browse files

fix(ChatModel): fetch contents before insert message at end

parent 8d8fb551
wip_release_4.2 debug_zrtp_traces feature/add-centos7-and-debian8-build-for-ci feature/add_displayname_identity_address feature/av1-support feature/ci_debian10 feature/cmake-refactor feature/cmake_refactor_jul feature/download-multipart feature/handle-code-siging-of-dmg-package-for-macos feature/keep_old_position feature/modify_version_check_url_for_new_server feature/multithreading feature/native_notifications feature/new_chat_layout feature/nix-build feature/nix-flake feature/noto_emoji feature/opengl_rendering_error_cb feature/qt6 feature/qt_tests feature/request_authentification_logs feature/test_vfs feature/use_multi_listener_api_only feature/webview_subscription_42 feature/webview_subscription_43 fix/LINQT-1263 fix/appimage_package_file_rights fix/autostart_conf_after_appimage_update fix/build_qt_5.12.11_to_fix_issues fix/call_and_secure_chatroom fix/change_logo fix/chat_char fix/chat_order_received fix/chat_sort_received_time_50 fix/chatgroup_creation_conf fix/conference_crash fix/crash_on_restart fix/debian9 fix/end_tone fix/filemessage_missing_pointsize fix/flexiapi_update fix/github_issue_template_values_to_placeholder fix/incoming_call_notif fix/mac_5_3_sdk_issues fix/mac_openh264 fix/macqt_crash_test fix/missing_qtwebview_in_docker_images fix/opengl_51 fix/phone_prefix fix/qml_dates fix/qt_crash fix/qt_rpm_build fix/qt_webview_webengine_build fix/quickfix_mac fix/readme_for_cmake_version fix/registration_expires fix/rename-database-paths-functions fix/sdk_variable_syntax fix/test_qt_sdk fix/test_sdk_qt_build fix/turnoff_discrete_gpu fix/update_readme fix/upgrade_singleapplication fix/utf8 fix/utf8_files fix/weblate fix/webview_deploy master_5 release/4.2 release/4.3 release/4.4 release/5.0 release/5.1 release/5.2 test/mediastreamer_test_campaign tests/ci wip_julien 5.3.0-alpha 5.2.6 5.2.5 5.2.4 5.2.3 5.2.2 5.2.1 5.2.0 5.2.0-beta 5.2.0-alpha 5.1.2 5.1.1 5.1.0 5.1.0-beta 5.1.0-alpha 5.0.18 5.0.17 5.0.16 5.0.15 5.0.14 5.0.13 5.0.12 5.0.11 5.0.10 5.0.9 5.0.8 5.0.7 5.0.6 5.0.5 5.0.4 5.0.3 5.0.2 5.0.1 5.0.0 5.0.0-beta 5.0.0-alpha 4.5.0-alpha 4.4.11 4.4.10 4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.4.0-beta 4.4.0-alpha 4.3.2 4.3.1 4.3.0 4.3.0-beta 4.3.0-alpha 4.2.5 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.2.0-beta 4.2.0-alpha
No related merge requests found
Showing with 8 additions and 7 deletions
......@@ -672,13 +672,14 @@ void ChatModel::insertMessageAtEnd (const shared_ptr<linphone::ChatMessage> &mes
int row = mEntries.count();
beginInsertRows(QModelIndex(), row, row);
mEntries << qMakePair(
QVariantMap{
{ "type", EntryType::MessageEntry },
{ "timestamp", QDateTime::fromMSecsSinceEpoch(message->getTime() * 1000) }
},
static_pointer_cast<void>(message)
);
QVariantMap map{
{ "type", EntryType::MessageEntry },
{ "timestamp", QDateTime::fromMSecsSinceEpoch(message->getTime() * 1000) }
};
fillMessageEntry(map, message);
mEntries << qMakePair(map, static_pointer_cast<void>(message));
endInsertRows();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment