mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 23:27:09 +02:00
Remove some options from Replies three-dot menu.
This commit is contained in:
parent
e9dffe78e3
commit
040f29abe6
2 changed files with 13 additions and 3 deletions
|
@ -475,6 +475,9 @@ void PeerData::setPinnedMessageId(MsgId messageId) {
|
|||
}
|
||||
|
||||
bool PeerData::canExportChatHistory() const {
|
||||
if (isRepliesChat()) {
|
||||
return false;
|
||||
}
|
||||
if (const auto channel = asChannel()) {
|
||||
if (!channel->amIn() && channel->invitePeekExpires()) {
|
||||
return false;
|
||||
|
@ -844,7 +847,9 @@ int PeerData::slowmodeSecondsLeft() const {
|
|||
|
||||
bool PeerData::canSendPolls() const {
|
||||
if (const auto user = asUser()) {
|
||||
return user->isBot() && !user->isSupport();
|
||||
return user->isBot()
|
||||
&& !user->isRepliesChat()
|
||||
&& !user->isSupport();
|
||||
} else if (const auto chat = asChat()) {
|
||||
return chat->canSendPolls();
|
||||
} else if (const auto channel = asChannel()) {
|
||||
|
|
|
@ -253,7 +253,9 @@ Filler::Filler(
|
|||
}
|
||||
|
||||
bool Filler::showInfo() {
|
||||
if (_source == PeerMenuSource::Profile || _peer->isSelf()) {
|
||||
if (_source == PeerMenuSource::Profile
|
||||
|| _peer->isSelf()
|
||||
|| _peer->isRepliesChat()) {
|
||||
return false;
|
||||
} else if (_controller->activeChatCurrent().peer() != _peer) {
|
||||
return true;
|
||||
|
@ -479,7 +481,9 @@ void Filler::addUserActions(not_null<UserData*> user) {
|
|||
tr::lng_info_delete_contact(tr::now),
|
||||
[=] { PeerMenuDeleteContact(user); });
|
||||
}
|
||||
if (user->isBot() && !user->botInfo->cantJoinGroups) {
|
||||
if (user->isBot()
|
||||
&& !user->isRepliesChat()
|
||||
&& !user->botInfo->cantJoinGroups) {
|
||||
using AddBotToGroup = AddBotToGroupBoxController;
|
||||
_addAction(
|
||||
tr::lng_profile_invite_to_group(tr::now),
|
||||
|
@ -500,6 +504,7 @@ void Filler::addUserActions(not_null<UserData*> user) {
|
|||
ClearHistoryHandler(user));
|
||||
if (!user->isInaccessible()
|
||||
&& user != user->session().user()
|
||||
&& !user->isRepliesChat()
|
||||
&& _source != PeerMenuSource::ChatsList) {
|
||||
addBlockUser(user);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue