mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Correctly check media when editing files.
This commit is contained in:
@@ -329,8 +329,9 @@ QString ImagesOrAllFilter() {
|
||||
return ImagesFilter() + u";;"_q + AllFilesFilter();
|
||||
}
|
||||
|
||||
QString AlbumFilesFilter() {
|
||||
return u"Image and Video Files (*.png *.jpg *.jpeg *.mp4 *.mov)"_q;
|
||||
QString PhotoVideoFilesFilter() {
|
||||
return u"Image and Video Files (*.png *.jpg *.jpeg *.mp4 *.mov);;"_q
|
||||
+ AllFilesFilter();
|
||||
}
|
||||
|
||||
namespace internal {
|
||||
|
@@ -93,7 +93,7 @@ void GetFolder(
|
||||
[[nodiscard]] QString ImagesFilter();
|
||||
[[nodiscard]] QString AllOrImagesFilter();
|
||||
[[nodiscard]] QString ImagesOrAllFilter();
|
||||
[[nodiscard]] QString AlbumFilesFilter();
|
||||
[[nodiscard]] QString PhotoVideoFilesFilter();
|
||||
|
||||
namespace internal {
|
||||
|
||||
|
@@ -111,7 +111,7 @@ bool IsMimeSticker(const QString &mime) {
|
||||
|| IsMimeStickerAnimated(mime);
|
||||
}
|
||||
|
||||
bool IsMimeAcceptedForAlbum(const QString &mime) {
|
||||
bool IsMimeAcceptedForPhotoVideoAlbum(const QString &mime) {
|
||||
return (mime == u"image/jpeg"_q)
|
||||
|| (mime == u"image/png"_q)
|
||||
|| (mime == u"video/mp4"_q)
|
||||
|
@@ -42,7 +42,7 @@ private:
|
||||
|
||||
[[nodiscard]] bool IsMimeStickerAnimated(const QString &mime);
|
||||
[[nodiscard]] bool IsMimeSticker(const QString &mime);
|
||||
[[nodiscard]] bool IsMimeAcceptedForAlbum(const QString &mime);
|
||||
[[nodiscard]] bool IsMimeAcceptedForPhotoVideoAlbum(const QString &mime);
|
||||
|
||||
[[nodiscard]] bool FileIsImage(const QString &name, const QString &mime);
|
||||
|
||||
|
Reference in New Issue
Block a user