mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00: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:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user