diff --git a/qml/components/LocationPreview.qml b/qml/components/LocationPreview.qml index f2882a5..bb83ab5 100644 --- a/qml/components/LocationPreview.qml +++ b/qml/components/LocationPreview.qml @@ -32,6 +32,7 @@ Item { } function updatePicture() { + imagePreviewItem.pictureFileInformation = null; if (locationData) { tdLibWrapper.getMapThumbnailFile(chatId, locationData.latitude, locationData.longitude, Math.round(imagePreviewItem.width), Math.round(imagePreviewItem.height)); } diff --git a/qml/pages/ChatPage.qml b/qml/pages/ChatPage.qml index 4e40703..aadc9c6 100644 --- a/qml/pages/ChatPage.qml +++ b/qml/pages/ChatPage.qml @@ -757,6 +757,10 @@ Page { console.log("[ChatModel] This message was updated, index " + index + ", updating content..."); messageDateText.text = getMessageStatusText(display, index, chatView.lastReadSentIndex); messageText.text = Emoji.emojify(Functions.getMessageText(display, false), messageText.font.pixelSize); + if(locationPreviewLoader.active && locationPreviewLoader.status === Loader.Ready) { + locationPreviewLoader.item.locationData = display.content.location; + locationPreviewLoader.item.updatePicture() + } } } }