Skip to content

Commit 2457ef3

Browse files
committed
Update to 4.9.1
1 parent e818607 commit 2457ef3

File tree

3 files changed

+35
-24
lines changed

3 files changed

+35
-24
lines changed

0002-Disable-saving-restrictions.patch

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,26 @@ index e3bbba7..5bc409d 100644
1414
controller->showToast(item->history()->peer->isBroadcast()
1515
? tr::lng_error_nocopy_channel(tr::now)
1616
diff --git a/Telegram/SourceFiles/data/data_story.cpp b/Telegram/SourceFiles/data/data_story.cpp
17-
index fbc6785..17e2336 100644
17+
index d5faa43..c6b26dc 100644
1818
--- a/Telegram/SourceFiles/data/data_story.cpp
1919
+++ b/Telegram/SourceFiles/data/data_story.cpp
20-
@@ -277,7 +277,7 @@ bool Story::edited() const {
20+
@@ -318,12 +318,11 @@ bool Story::edited() const {
2121
}
2222

23-
bool Story::canDownload() const {
24-
- return /*!forbidsForward() || */_peer->isSelf();
23+
bool Story::canDownloadIfPremium() const {
24+
- return !forbidsForward() || _peer->isSelf();
25+
+ return true;
26+
}
27+
28+
bool Story::canDownloadChecked() const {
29+
- return _peer->isSelf()
30+
- || (canDownloadIfPremium() && _peer->session().premium());
2531
+ return true;
2632
}
2733

2834
bool Story::canShare() const {
2935
diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp
30-
index 5074219..3cc5619 100644
36+
index 2f1dabe..bd6d25f 100644
3137
--- a/Telegram/SourceFiles/history/history_inner_widget.cpp
3238
+++ b/Telegram/SourceFiles/history/history_inner_widget.cpp
3339
@@ -649,14 +649,7 @@ void HistoryInner::setupSharingDisallowed() {
@@ -46,7 +52,7 @@ index 5074219..3cc5619 100644
4652
}
4753

4854
void HistoryInner::messagesReceived(
49-
@@ -2666,12 +2659,12 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
55+
@@ -2665,12 +2658,12 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
5056
}
5157

5258
bool HistoryInner::hasCopyRestriction(HistoryItem *item) const {
@@ -62,10 +68,10 @@ index 5074219..3cc5619 100644
6268

6369
bool HistoryInner::showCopyRestriction(HistoryItem *item) {
6470
diff --git a/Telegram/SourceFiles/history/history_item.cpp b/Telegram/SourceFiles/history/history_item.cpp
65-
index bc0fffe..2a50090 100644
71+
index 55e1def..745338c 100644
6672
--- a/Telegram/SourceFiles/history/history_item.cpp
6773
+++ b/Telegram/SourceFiles/history/history_item.cpp
68-
@@ -1976,9 +1976,4 @@ bool HistoryItem::forbidsForward() const {
74+
@@ -1999,11 +1999,6 @@ bool HistoryItem::forbidsForward() const {
6975
}
7076

7177
bool HistoryItem::forbidsSaving() const {
@@ -75,11 +81,13 @@ index bc0fffe..2a50090 100644
7581
- return (invoice->extendedMedia != nullptr);
7682
- }
7783
return false;
84+
}
85+
7886
diff --git a/Telegram/SourceFiles/history/view/history_view_list_widget.cpp b/Telegram/SourceFiles/history/view/history_view_list_widget.cpp
79-
index 5903fa9..6135e9b 100644
87+
index 3de0cb2..0359ab3 100644
8088
--- a/Telegram/SourceFiles/history/view/history_view_list_widget.cpp
8189
+++ b/Telegram/SourceFiles/history/view/history_view_list_widget.cpp
82-
@@ -1428,13 +1428,11 @@ bool ListWidget::isEmpty() const {
90+
@@ -1420,13 +1420,11 @@ bool ListWidget::isEmpty() const {
8391
}
8492

8593
bool ListWidget::hasCopyRestriction(HistoryItem *item) const {
@@ -95,7 +103,7 @@ index 5903fa9..6135e9b 100644
95103
}
96104

97105
bool ListWidget::showCopyRestriction(HistoryItem *item) {
98-
@@ -1460,21 +1458,6 @@ bool ListWidget::showCopyMediaRestriction(not_null<HistoryItem*> item) {
106+
@@ -1452,21 +1450,6 @@ bool ListWidget::showCopyMediaRestriction(not_null<HistoryItem*> item) {
99107
}
100108

101109
bool ListWidget::hasCopyRestrictionForSelected() const {
@@ -117,7 +125,7 @@ index 5903fa9..6135e9b 100644
117125
return false;
118126
}
119127

120-
@@ -1493,8 +1476,7 @@ bool ListWidget::showCopyRestrictionForSelected() {
128+
@@ -1485,8 +1468,7 @@ bool ListWidget::showCopyRestrictionForSelected() {
121129
}
122130

123131
bool ListWidget::hasSelectRestriction() const {
@@ -170,18 +178,21 @@ index 3e75975..ee23733 100644
170178

171179
rpl::producer<bool> Provider::hasSelectRestrictionChanges() {
172180
diff --git a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
173-
index 2f2cf16..109653d 100644
181+
index 0a58cdb..626773f 100644
174182
--- a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
175183
+++ b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
176-
@@ -1025,10 +1025,7 @@ QSize OverlayWidget::flipSizeByRotation(QSize size) const {
184+
@@ -1031,13 +1031,7 @@ QSize OverlayWidget::flipSizeByRotation(QSize size) const {
177185
}
178186

179-
bool OverlayWidget::hasCopyMediaRestriction() const {
180-
- const auto story = _stories ? _stories->story() : nullptr;
181-
- return (story && !story->canDownload())
182-
- || (_history && !_history->peer->allowsForwarding())
187+
bool OverlayWidget::hasCopyMediaRestriction(bool skipPremiumCheck) const {
188+
- if (const auto story = _stories ? _stories->story() : nullptr) {
189+
- return skipPremiumCheck
190+
- ? !story->canDownloadIfPremium()
191+
- : !story->canDownloadChecked();
192+
- }
193+
- return (_history && !_history->peer->allowsForwarding())
183194
- || (_message && _message->forbidsSaving());
184195
+ return false;
185196
}
186197

187-
bool OverlayWidget::showCopyMediaRestriction() {
198+
bool OverlayWidget::showCopyMediaRestriction(bool skipPRemiumCheck) {

PKGBUILD

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# https://gitlab.archlinux.org/archlinux/packaging/packages/telegram-desktop/-/blob/main/PKGBUILD
22
pkgname=telegram-desktop-patched
3-
pkgver=4.8.9
3+
pkgver=4.9.1
44
pkgrel=1
55
pkgdesc='Telegram Desktop client with some anti-features (sponsored messages, saving restrictions and other) disabled.'
66
arch=('x86_64')
@@ -22,10 +22,10 @@ source=("https://github.com/telegramdesktop/tdesktop/releases/download/v${pkgver
2222
"0002-Disable-saving-restrictions.patch"
2323
"0003-Disable-invite-peeking-restrictions.patch"
2424
"0004-Disable-accounts-limit.patch")
25-
sha512sums=('56c6a2f1733e4b0d87570541dcad03e6ebf13c461a748cda6136d85b2fb939d2245c41db0c212a70fa998ad73d0578df0381bfdcebc0fd352344a67134b6aad9'
25+
sha512sums=('9ed831ff01e9972838f79d81147933c38b629ea29f3198f24e84bd5ff595ffefee9407f995db84c44e18f72de7cb2e95bf4ef0560c8e10f64bcbaaefb63a624d'
2626
'6650e822de2529582d93291025500afb6a182a0c5a564f656f164d79d8765bb4ca9c9d16227148431cc71c2677923b9364e81bbd4ca4f07f68e36bb380fb9574'
2727
"d5898c0f12a90c39f277b874d9650b7e9ebea224f49e635c0c4275801d228a435b6b1ba0614ade1ade7eca63c4a4434779f056dd8950e2cb1c1ed9438adaa904"
28-
"b8d748c2323fd1092555604f8643577ae3f84e7d6babc0b4fec4509b27186827ad197f6f7cd5e7222a49b6b65557fd306c27701a0d1100289d32a825b615d793"
28+
"4072e1c304fbb699d0d0cc42070480a3ac5580ba57bbc9b66debc030b04724fe5e7d02105c8ab270de2c4d3c58c1890040a03fe42cd329c934cfb087c1fab360"
2929
"2c19b303ce77aa5b92dcbc46e61c0f45a5eb5fdb8810bd5f86a5d51acc4a79d6c41742d5197a0d72a6224e5f26855ab74ed35b5d085e8ba713cc9c87d8f54897"
3030
"cba09b95960960f5657b5482389deb75abad8f4200f4809943e1ca873c19cf4caa99ef79f0ff32ecb17337e1b375523e310bc5e8843d13c8b3a5dff705ca9218")
3131

PKGBUILD.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ undefine(`hashes')dnl
1919
dnl template
2020
# https://gitlab.archlinux.org/archlinux/packaging/packages/telegram-desktop/-/blob/main/PKGBUILD
2121
pkgname=telegram-desktop-patched
22-
pkgver=4.8.9
22+
pkgver=4.9.1
2323
pkgrel=1
2424
pkgdesc='Telegram Desktop client with some anti-features (sponsored messages, saving restrictions and other) disabled.'
2525
arch=('x86_64')
@@ -38,7 +38,7 @@ conflicts=("telegram-desktop")
3838
source=("https://github.com/telegramdesktop/tdesktop/releases/download/v${pkgver}/tdesktop-${pkgver}-full.tar.gz"
3939
https://download.gnome.org/sources/glibmm/2.77/glibmm-2.77.0.tar.xz
4040
PATCH_FILENAMES)
41-
sha512sums=('56c6a2f1733e4b0d87570541dcad03e6ebf13c461a748cda6136d85b2fb939d2245c41db0c212a70fa998ad73d0578df0381bfdcebc0fd352344a67134b6aad9'
41+
sha512sums=('9ed831ff01e9972838f79d81147933c38b629ea29f3198f24e84bd5ff595ffefee9407f995db84c44e18f72de7cb2e95bf4ef0560c8e10f64bcbaaefb63a624d'
4242
'6650e822de2529582d93291025500afb6a182a0c5a564f656f164d79d8765bb4ca9c9d16227148431cc71c2677923b9364e81bbd4ca4f07f68e36bb380fb9574'
4343
PATCH_HASHES)
4444

0 commit comments

Comments
 (0)