Added ability to short info for peer from menu with pressed Ctrl.
This commit is contained in:
@@ -40,6 +40,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "boxes/peers/add_participants_box.h"
|
||||
#include "boxes/peers/edit_forum_topic_box.h"
|
||||
#include "boxes/peers/edit_contact_box.h"
|
||||
#include "boxes/peers/prepare_short_info_box.h"
|
||||
#include "calls/calls_instance.h"
|
||||
#include "inline_bots/bot_attach_web_view.h" // InlineBots::PeerType.
|
||||
#include "ui/toast/toast.h"
|
||||
@@ -578,7 +579,12 @@ void Filler::addInfo() {
|
||||
: tr::lng_context_view_channel(tr::now);
|
||||
_addAction(text, [=] {
|
||||
if (const auto strong = weak.get()) {
|
||||
controller->showPeerInfo(strong);
|
||||
if (base::IsCtrlPressed()) {
|
||||
controller->uiShow()->showBox(
|
||||
PrepareShortInfoBox(infoPeer, controller));
|
||||
} else {
|
||||
controller->showPeerInfo(strong);
|
||||
}
|
||||
}
|
||||
}, infoPeer->isUser() ? &st::menuIconProfile : &st::menuIconInfo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user