mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 10:11:41 -05:00
Fixed incorrect display of uploaded video's thumbnail in edited message.
- After uploading a video the data_document changes a source of the good thumbnail and loses an information about it (e.g. width, height, bytesSize).
This commit is contained in:
parent
2aecd1035e
commit
3a5bad4b7a
1 changed files with 5 additions and 0 deletions
|
@ -334,6 +334,11 @@ Image::Image(std::unique_ptr<Source> &&source)
|
|||
}
|
||||
|
||||
void Image::replaceSource(std::unique_ptr<Source> &&source) {
|
||||
const auto width = _source->width();
|
||||
const auto height = _source->height();
|
||||
if (width > 0 && height > 0) {
|
||||
source->setInformation(_source->bytesSize(), width, height);
|
||||
}
|
||||
_source = std::move(source);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue