update live locations

This commit is contained in:
John Gibbon 2020-09-29 15:50:21 +02:00
parent b58e33b2a4
commit 75ef6e70a4
2 changed files with 5 additions and 0 deletions

View file

@ -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));
}

View file

@ -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()
}
}
}
}