2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Move SingleMediaPreview to td_ui.

This commit is contained in:
John Preston
2020-10-13 20:15:52 +03:00
parent 8b96f4c214
commit 64ac6b18bf
11 changed files with 327 additions and 272 deletions

View File

@@ -498,7 +498,7 @@ void EditCaptionBox::updateEditPreview() {
auto shouldAsDoc = true;
auto docPhotoSize = QSize();
if (const auto image = std::get_if<Info::Image>(fileMedia)) {
shouldAsDoc = !Storage::ValidateThumbDimensions(
shouldAsDoc = !Ui::ValidateThumbDimensions(
image->data.width(),
image->data.height());
if (shouldAsDoc) {
@@ -694,7 +694,7 @@ bool EditCaptionBox::fileFromClipboard(not_null<const QMimeData*> data) {
using Info = Ui::PreparedFileInformation;
const auto fileMedia = &file->information->media;
if (const auto image = std::get_if<Info::Image>(fileMedia)) {
return !Storage::ValidateThumbDimensions(
return !Ui::ValidateThumbDimensions(
image->data.width(),
image->data.height());
}