mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-07 18:06:04 +00:00
Remove some more Auth() calls.
This commit is contained in:
@@ -98,7 +98,9 @@ int Style::minButtonWidth(HistoryMessageMarkupButton::Type type) const {
|
||||
|
||||
} // namespace
|
||||
|
||||
BotKeyboard::BotKeyboard(QWidget *parent) : TWidget(parent)
|
||||
BotKeyboard::BotKeyboard(not_null<Main::Session*> session, QWidget *parent)
|
||||
: TWidget(parent)
|
||||
, _session(session)
|
||||
, _st(&st::botKbButton) {
|
||||
setGeometry(0, 0, _st->margin, st::botKbScroll.deltat);
|
||||
_height = st::botKbScroll.deltat;
|
||||
@@ -149,7 +151,7 @@ void BotKeyboard::leaveEventHook(QEvent *e) {
|
||||
}
|
||||
|
||||
bool BotKeyboard::moderateKeyActivate(int key) {
|
||||
if (const auto item = Auth().data().message(_wasForMsgId)) {
|
||||
if (const auto item = _session->data().message(_wasForMsgId)) {
|
||||
if (const auto markup = item->Get<HistoryMessageReplyMarkup>()) {
|
||||
if (key >= Qt::Key_1 && key <= Qt::Key_9) {
|
||||
const auto index = int(key - Qt::Key_1);
|
||||
|
Reference in New Issue
Block a user