mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Version 3.7.3: Don't copy text from a restricted post.
This commit is contained in:
parent
deeea0aaed
commit
075ab20e5b
1 changed files with 10 additions and 0 deletions
|
@ -1243,6 +1243,11 @@ bool ListWidget::hasCopyRestrictionForSelected() const {
|
||||||
if (hasCopyRestriction()) {
|
if (hasCopyRestriction()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (_selected.empty()) {
|
||||||
|
if (_selectedTextItem && _selectedTextItem->forbidsForward()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
for (const auto &[itemId, selection] : _selected) {
|
for (const auto &[itemId, selection] : _selected) {
|
||||||
if (const auto item = session().data().message(itemId)) {
|
if (const auto item = session().data().message(itemId)) {
|
||||||
if (item->forbidsForward()) {
|
if (item->forbidsForward()) {
|
||||||
|
@ -1254,6 +1259,11 @@ bool ListWidget::hasCopyRestrictionForSelected() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ListWidget::showCopyRestrictionForSelected() {
|
bool ListWidget::showCopyRestrictionForSelected() {
|
||||||
|
if (_selected.empty()) {
|
||||||
|
if (_selectedTextItem && showCopyRestriction(_selectedTextItem)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
for (const auto &[itemId, selection] : _selected) {
|
for (const auto &[itemId, selection] : _selected) {
|
||||||
if (showCopyRestriction(session().data().message(itemId))) {
|
if (showCopyRestriction(session().data().message(itemId))) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue