Fix Locations
This commit is contained in:
parent
e6748dbc18
commit
935bcaeb85
1 changed files with 6 additions and 7 deletions
|
@ -51,17 +51,16 @@ MessageContentBase {
|
||||||
Connections {
|
Connections {
|
||||||
target: tdLibWrapper
|
target: tdLibWrapper
|
||||||
onFileUpdated: {
|
onFileUpdated: {
|
||||||
if(fileInformation["@extra"] !== imagePreviewItem.fileExtra) {
|
if(fileInformation["@extra"] !== imagePreviewItem.fileExtra && (!imagePreviewItem.pictureFileInformation || imagePreviewItem.pictureFileInformation.id !== fileInformation.id)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(fileInformation.local.is_downloading_completed) {
|
||||||
if(!imagePreviewItem.pictureFileInformation) {
|
|
||||||
imagePreviewItem.pictureFileInformation = fileInformation;
|
|
||||||
tdLibWrapper.downloadFile(imagePreviewItem.pictureFileInformation.id);
|
|
||||||
} else if(imagePreviewItem.pictureFileInformation && fileInformation.id === imagePreviewItem.pictureFileInformation.id) {
|
|
||||||
imagePreviewItem.pictureFileInformation = fileInformation;
|
|
||||||
singleImage.source = fileInformation.local.path;
|
singleImage.source = fileInformation.local.path;
|
||||||
|
} else if(fileInformation.local.can_be_downloaded && !fileInformation.local.is_downloading_active) {
|
||||||
|
tdLibWrapper.downloadFile(fileInformation.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
imagePreviewItem.pictureFileInformation = fileInformation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue