Repository navigation
Commit 217ce78
Hide Copy in text selection when Disable Sharing is on in private chats
ChatActivity's text-selection canCopy() only honoured the peer-level
no-forwards flag for groups/channels (dialogId < 0). The private-chat
"Disable Sharing" setting lives on UserFull (noforwards_my_enabled /
noforwards_peer_enabled), so long-pressing a message in such a chat
still offered Copy and Select All for the selected text.
Use ChatActivity.isPeerNoForwards(), which covers both chats and users
and is already used by the message context menu, limited to cloud
chats so secret chats behave exactly as before. Also guard
TextSelectionHelper.copyText() with canCopy() as a defensive check.
Fixes https://bugs.telegram.org/c/66665
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent f32ffee commit 217ce78
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1731 | 1731 | | |
1732 | 1732 | | |
1733 | 1733 | | |
1734 | | - | |
| 1734 | + | |
1735 | 1735 | | |
1736 | 1736 | | |
1737 | 1737 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3557 | 3557 | | |
3558 | 3558 | | |
3559 | 3559 | | |
3560 | | - | |
| 3560 | + | |
3561 | 3561 | | |
3562 | 3562 | | |
3563 | 3563 | | |
| |||
0 commit comments