@@ -14,20 +14,26 @@ index e3bbba7..5bc409d 100644
1414 controller->showToast(item->history()->peer->isBroadcast()
1515 ? tr::lng_error_nocopy_channel(tr::now)
1616diff --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 {
2935diff --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) {
6470diff --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+
7886diff --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() {
172180diff --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 ) {
0 commit comments