summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorudf2019-08-17 22:33:25 +0200
committerudf2019-08-17 22:59:27 +0200
commit5d3ab760fdc598adc08e04c24382a19dd0942af7 (patch)
tree621b1533ef12c091165e5f0f1019d407c91e5734
parenta6ec930b22cb8cce709747b52c74f406c6d66317 (diff)
downloadaur-5d3ab760fdc598adc08e04c24382a19dd0942af7.tar.gz
Add always_send_as_photo_or_album.patch
-rw-r--r--PKGBUILD3
-rw-r--r--always_send_as_photo_or_album.patch22
2 files changed, 25 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 1cb7dac950dc..7ae691aa001f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -44,6 +44,7 @@ source=(
# Custom patches
"always_delete_for_everyone.patch"
"always_pin_without_notify.patch"
+ "always_send_as_photo_or_album.patch"
)
sha512sums=(
'SKIP'
@@ -65,6 +66,7 @@ sha512sums=(
'e25dc1c54d6001a7a3740c6cee40a12a2313a3fd2e41986268f0ee5d9d8bf2d34812f539efb0eb5d26d3f263b2e4a7849016711532bf215aa9ff38da30175557'
'31ed454cbfe5811dedfac516e1c55cd6a2ea69fedb5e09035c04ed1b9647270eafdee1501494ecd948b6baa7a38dbf0747ba686dc89f31804589a39470793ac2'
'b4eeeb4b2801f3edcc7423f28403b1dfabd3f3869425e4f102a2a4554bde93e63bd73d2d4dbf3e5748ce831b570e441d3917f532fc5cceac1ee5e8fd0832cb30'
+ '650a2a2568cacd2775979614c06c90a4c505207246eb229bbf4fccd8e9fc2540093eaa5bd748e3801c1e1b43beb89b19674c27c5f400d451475b0ee068b04ca2'
)
prepare() {
@@ -89,6 +91,7 @@ prepare() {
# custom patches
patch -Np1 -i "$srcdir/always_delete_for_everyone.patch"
patch -Np1 -i "$srcdir/always_pin_without_notify.patch"
+ patch -Np1 -i "$srcdir/always_send_as_photo_or_album.patch"
# disable static-qt for rlottie
sed "/RLOTTIE_WITH_STATIC_QT/d" -i "$srcdir/tdesktop/Telegram/gyp/lib_rlottie.gyp"
diff --git a/always_send_as_photo_or_album.patch b/always_send_as_photo_or_album.patch
new file mode 100644
index 000000000000..20009befc3c5
--- /dev/null
+++ b/always_send_as_photo_or_album.patch
@@ -0,0 +1,22 @@
+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 2f4c45c48..ed9bf4bb6 100644
+--- a/Telegram/SourceFiles/boxes/send_files_box.cpp
++++ b/Telegram/SourceFiles/boxes/send_files_box.cpp
+@@ -1498,14 +1498,6 @@ void SendFilesBox::initSendWay() {
+ ? SendFilesWay::Album
+ : SendFilesWay::Photos;
+ }
+- const auto way = _controller->session().settings().sendFilesWay();
+- if (way == SendFilesWay::Files) {
+- return way;
+- } else if (way == SendFilesWay::Album) {
+- return _list.albumIsPossible
+- ? SendFilesWay::Album
+- : SendFilesWay::Photos;
+- }
+ return (_list.albumIsPossible && !_albumPhotosCount)
+ ? SendFilesWay::Album
+ : SendFilesWay::Photos;