diff --git a/Telegram/SourceFiles/boxes/edit_caption_box.cpp b/Telegram/SourceFiles/boxes/edit_caption_box.cpp index 97adb7717..7c76d3d05 100644 --- a/Telegram/SourceFiles/boxes/edit_caption_box.cpp +++ b/Telegram/SourceFiles/boxes/edit_caption_box.cpp @@ -518,12 +518,12 @@ void EditCaptionBox::createEditMediaButton() { const auto buttonCallback = [=] { const auto filters = _isAlbum - ? QStringList(qsl("Image and Video Files (*.png *.jpg *.mp4)")) - : QStringList(FileDialog::AllFilesFilter()); + ? FileDialog::AlbumFilesFilter() + : FileDialog::AllFilesFilter(); FileDialog::GetOpenPath( this, tr::lng_choose_file(tr::now), - filters.join(qsl(";;")), + filters, crl::guard(this, callback)); }; diff --git a/Telegram/SourceFiles/boxes/send_files_box.cpp b/Telegram/SourceFiles/boxes/send_files_box.cpp index f615f3632..ce5b585d7 100644 --- a/Telegram/SourceFiles/boxes/send_files_box.cpp +++ b/Telegram/SourceFiles/boxes/send_files_box.cpp @@ -1667,7 +1667,7 @@ void SendFilesBox::addThumbButtonHandlers() { FileDialog::GetOpenPath( this, tr::lng_choose_file(tr::now), - qsl("Image and Video Files (*.png *.jpg *.mp4)"), + FileDialog::AlbumFilesFilter(), crl::guard(this, callback)); }, _albumPreview->lifetime()); diff --git a/Telegram/SourceFiles/core/file_utilities.cpp b/Telegram/SourceFiles/core/file_utilities.cpp index a90ee52b9..5236bf236 100644 --- a/Telegram/SourceFiles/core/file_utilities.cpp +++ b/Telegram/SourceFiles/core/file_utilities.cpp @@ -295,6 +295,10 @@ QString AllFilesFilter() { #endif // Q_OS_WIN } +QString AlbumFilesFilter() { + return qsl("Image and Video Files (*.png *.jpg *.mp4 *.jpeg)"); +} + namespace internal { void InitLastPathDefault() { diff --git a/Telegram/SourceFiles/core/file_utilities.h b/Telegram/SourceFiles/core/file_utilities.h index 8e25f691e..7a0b4c74f 100644 --- a/Telegram/SourceFiles/core/file_utilities.h +++ b/Telegram/SourceFiles/core/file_utilities.h @@ -82,6 +82,7 @@ void GetFolder( Fn failed = Fn()); QString AllFilesFilter(); +QString AlbumFilesFilter(); namespace internal {