summarylogtreecommitdiffstats
path: root/always_send_as_photo_or_album.patch
diff options
context:
space:
mode:
authorudf2020-11-07 04:19:25 +0200
committerudf2020-11-07 04:19:25 +0200
commitd76d13bfef610aa750ad45f77ceabdc87fc05dc8 (patch)
tree8aa6a8149d54cdb2caffe2865a09407527a68e5c /always_send_as_photo_or_album.patch
parent6b4b378db13dc9a6bcab7762b99beb255cd9c66c (diff)
downloadaur-d76d13bfef610aa750ad45f77ceabdc87fc05dc8.tar.gz
Update to version 2.4.7
Always pin for other party by default
Diffstat (limited to 'always_send_as_photo_or_album.patch')
-rw-r--r--always_send_as_photo_or_album.patch38
1 files changed, 20 insertions, 18 deletions
diff --git a/always_send_as_photo_or_album.patch b/always_send_as_photo_or_album.patch
index ce55615f9b54..24bfaf8ed150 100644
--- a/always_send_as_photo_or_album.patch
+++ b/always_send_as_photo_or_album.patch
@@ -1,23 +1,25 @@
-Description: Disables loading the previous way media was sent, so it always selects either
-photo or album by default.
-
diff --git a/Telegram/SourceFiles/boxes/send_files_box.cpp b/Telegram/SourceFiles/boxes/send_files_box.cpp
+index e7d1f80..ffbb2ab 100644
--- a/Telegram/SourceFiles/boxes/send_files_box.cpp
+++ b/Telegram/SourceFiles/boxes/send_files_box.cpp
-@@ -1947,14 +1947,6 @@
- ? SendFilesWay::Album
- : SendFilesWay::Photos;
- }
-- const auto way = Core::App().settings().sendFilesWay();
-- if (way == SendFilesWay::Files) {
-- return way;
-- } else if (way == SendFilesWay::Album) {
-- return _list.albumIsPossible
-- ? SendFilesWay::Album
-- : SendFilesWay::Photos;
+@@ -424,17 +424,9 @@ void SendFilesBox::openDialogToAddFileToAlbum() {
+
+ void SendFilesBox::initSendWay() {
+ _sendWay = [&] {
+- auto result = Core::App().settings().sendFilesWay();
+- if (_sendLimit == SendLimit::One) {
+- result.setGroupFiles(true);
+- return result;
+- } else if (_list.overrideSendImagesAsPhotos == false) {
+- result.setSendImagesAsPhotos(false);
+- return result;
+- } else if (_list.overrideSendImagesAsPhotos == true) {
+- result.setSendImagesAsPhotos(true);
+- return result;
- }
-- return (_list.albumIsPossible && !_albumPhotosCount)
-+ return _list.albumIsPossible
- ? SendFilesWay::Album
- : SendFilesWay::Photos;
++ auto result = SendFilesWay();
++ result.setGroupFiles(true);
++ result.setSendImagesAsPhotos(true);
+ return result;
}();
+ _sendWay.changes(