Fix attempt for image not displaying immediatly

This commit is contained in:
Gaelle Braud 2026-02-25 09:45:55 +01:00
parent 0293aedb58
commit cef5a85d63
2 changed files with 7 additions and 0 deletions

View file

@ -155,6 +155,12 @@ void ChatMessageContentCore::setSelf(QSharedPointer<ChatMessageContentCore> me)
mChatMessageContentModelConnection->invokeToCore(
[this, msgState = LinphoneEnums::fromLinphone(state)] { emit msgStateChanged(msgState); });
});
// Sync state from SDK in case the file was already downloaded before we registered as listener
// (e.g. auto-download in group chats may complete before the UI objects are created).
if (mIsFileTransfer && !mWasDownloaded) {
mChatMessageContentModelConnection->invokeToModel([this] { mChatMessageContentModel->createThumbnail(); });
}
}
bool ChatMessageContentCore::isFile() const {

View file

@ -459,6 +459,7 @@ FocusScope {
(mainItem.chatMessage ? qsTr("reply_to_label").arg(UtilsCpp.boldTextPart(mainItem.chatMessage.core.fromName, mainItem.chatMessage.core.fromName)) : "")
: qsTr("conversation_editing_message_title")
color: DefaultStyle.main2_500_main
textFormar: Text.RichText
font {
pixelSize: Typography.p3.pixelSize
weight: Typography.p3.weight