2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-27 20:57:32 +00:00
tdesktop/Telegram/SourceFiles/ui/chat/attach/attach_extensions.cpp
Ilya Fedin 9fba9048af Use the same check for drag'n'drop image type as for file dialog
The code path when choosing an image in file dialog tries to read a QImage with Images::Read and then only checks that mime type starts with image/ in ValidPhotoForAlbum

Core::FileIsImage and QImageReader::canRead checks should provide the same behavior
2022-12-26 14:23:23 +04:00

25 lines
506 B
C++

/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "ui/chat/attach/attach_extensions.h"
namespace Ui {
const QStringList &ImageExtensions() {
static const auto result = QStringList{
u".bmp"_q,
u".jpg"_q,
u".jpeg"_q,
u".png"_q,
u".gif"_q,
};
return result;
return result;
}
} // namespace Ui