mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Removed left button from short info box with self.
This commit is contained in:
parent
16117e56bb
commit
9a72b05117
3 changed files with 14 additions and 7 deletions
|
@ -685,12 +685,16 @@ rpl::producer<int> PeerShortInfoBox::moveRequests() const {
|
||||||
void PeerShortInfoBox::prepare() {
|
void PeerShortInfoBox::prepare() {
|
||||||
addButton(tr::lng_close(), [=] { closeBox(); });
|
addButton(tr::lng_close(), [=] { closeBox(); });
|
||||||
|
|
||||||
// Perhaps a new lang key should be added for opening a group.
|
if (_type != PeerShortInfoType::Self) {
|
||||||
addLeftButton((_type == PeerShortInfoType::User)
|
// Perhaps a new lang key should be added for opening a group.
|
||||||
? tr::lng_profile_send_message()
|
addLeftButton(
|
||||||
: (_type == PeerShortInfoType::Group)
|
(_type == PeerShortInfoType::User)
|
||||||
? tr::lng_view_button_group()
|
? tr::lng_profile_send_message()
|
||||||
: tr::lng_profile_view_channel(), [=] { _openRequests.fire({}); });
|
: (_type == PeerShortInfoType::Group)
|
||||||
|
? tr::lng_view_button_group()
|
||||||
|
: tr::lng_profile_view_channel(),
|
||||||
|
[=] { _openRequests.fire({}); });
|
||||||
|
}
|
||||||
|
|
||||||
prepareRows();
|
prepareRows();
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ class RpWidget;
|
||||||
} // namespace Ui
|
} // namespace Ui
|
||||||
|
|
||||||
enum class PeerShortInfoType {
|
enum class PeerShortInfoType {
|
||||||
|
Self,
|
||||||
User,
|
User,
|
||||||
Group,
|
Group,
|
||||||
Channel,
|
Channel,
|
||||||
|
|
|
@ -431,7 +431,9 @@ object_ptr<Ui::BoxContent> PrepareShortInfoBox(
|
||||||
Fn<void()> open,
|
Fn<void()> open,
|
||||||
Fn<bool()> videoPaused,
|
Fn<bool()> videoPaused,
|
||||||
const style::ShortInfoBox *stOverride) {
|
const style::ShortInfoBox *stOverride) {
|
||||||
const auto type = peer->isUser()
|
const auto type = peer->isSelf()
|
||||||
|
? PeerShortInfoType::Self
|
||||||
|
: peer->isUser()
|
||||||
? PeerShortInfoType::User
|
? PeerShortInfoType::User
|
||||||
: peer->isBroadcast()
|
: peer->isBroadcast()
|
||||||
? PeerShortInfoType::Channel
|
? PeerShortInfoType::Channel
|
||||||
|
|
Loading…
Add table
Reference in a new issue