void Controller::showPeerHistory( not_null<History*> history, const SectionShow ¶ms, MsgId msgId) { showPeerHistory( history->peer->id, params, msgId); }
void Controller::showPeerHistory( not_null<PeerData*> peer, const SectionShow ¶ms, MsgId msgId) { showPeerHistory( peer->id, params, msgId); }
void PeerClickHandler::onClick(Qt::MouseButton button) const { if (button == Qt::LeftButton && App::wnd()) { auto controller = App::wnd()->controller(); if (_peer && _peer->isChannel() && controller->historyPeer.current() != _peer) { if (!_peer->asChannel()->isPublic() && !_peer->asChannel()->amIn()) { Ui::show(Box<InformBox>(lang(_peer->isMegagroup() ? lng_group_not_accessible : lng_channel_not_accessible))); } else { controller->showPeerHistory( _peer, Window::SectionShow::Way::Forward); } } else { Ui::showPeerProfile(_peer); } } }