mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 14:08:41 +00:00
Remove some options from Replies three-dot menu.
This commit is contained in:
@@ -475,6 +475,9 @@ void PeerData::setPinnedMessageId(MsgId messageId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool PeerData::canExportChatHistory() const {
|
bool PeerData::canExportChatHistory() const {
|
||||||
|
if (isRepliesChat()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (const auto channel = asChannel()) {
|
if (const auto channel = asChannel()) {
|
||||||
if (!channel->amIn() && channel->invitePeekExpires()) {
|
if (!channel->amIn() && channel->invitePeekExpires()) {
|
||||||
return false;
|
return false;
|
||||||
@@ -844,7 +847,9 @@ int PeerData::slowmodeSecondsLeft() const {
|
|||||||
|
|
||||||
bool PeerData::canSendPolls() const {
|
bool PeerData::canSendPolls() const {
|
||||||
if (const auto user = asUser()) {
|
if (const auto user = asUser()) {
|
||||||
return user->isBot() && !user->isSupport();
|
return user->isBot()
|
||||||
|
&& !user->isRepliesChat()
|
||||||
|
&& !user->isSupport();
|
||||||
} else if (const auto chat = asChat()) {
|
} else if (const auto chat = asChat()) {
|
||||||
return chat->canSendPolls();
|
return chat->canSendPolls();
|
||||||
} else if (const auto channel = asChannel()) {
|
} else if (const auto channel = asChannel()) {
|
||||||
|
@@ -253,7 +253,9 @@ Filler::Filler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Filler::showInfo() {
|
bool Filler::showInfo() {
|
||||||
if (_source == PeerMenuSource::Profile || _peer->isSelf()) {
|
if (_source == PeerMenuSource::Profile
|
||||||
|
|| _peer->isSelf()
|
||||||
|
|| _peer->isRepliesChat()) {
|
||||||
return false;
|
return false;
|
||||||
} else if (_controller->activeChatCurrent().peer() != _peer) {
|
} else if (_controller->activeChatCurrent().peer() != _peer) {
|
||||||
return true;
|
return true;
|
||||||
@@ -479,7 +481,9 @@ void Filler::addUserActions(not_null<UserData*> user) {
|
|||||||
tr::lng_info_delete_contact(tr::now),
|
tr::lng_info_delete_contact(tr::now),
|
||||||
[=] { PeerMenuDeleteContact(user); });
|
[=] { PeerMenuDeleteContact(user); });
|
||||||
}
|
}
|
||||||
if (user->isBot() && !user->botInfo->cantJoinGroups) {
|
if (user->isBot()
|
||||||
|
&& !user->isRepliesChat()
|
||||||
|
&& !user->botInfo->cantJoinGroups) {
|
||||||
using AddBotToGroup = AddBotToGroupBoxController;
|
using AddBotToGroup = AddBotToGroupBoxController;
|
||||||
_addAction(
|
_addAction(
|
||||||
tr::lng_profile_invite_to_group(tr::now),
|
tr::lng_profile_invite_to_group(tr::now),
|
||||||
@@ -500,6 +504,7 @@ void Filler::addUserActions(not_null<UserData*> user) {
|
|||||||
ClearHistoryHandler(user));
|
ClearHistoryHandler(user));
|
||||||
if (!user->isInaccessible()
|
if (!user->isInaccessible()
|
||||||
&& user != user->session().user()
|
&& user != user->session().user()
|
||||||
|
&& !user->isRepliesChat()
|
||||||
&& _source != PeerMenuSource::ChatsList) {
|
&& _source != PeerMenuSource::ChatsList) {
|
||||||
addBlockUser(user);
|
addBlockUser(user);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user