2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Remove some more Auth() calls.

This commit is contained in:
John Preston
2020-06-08 13:06:50 +04:00
parent bede709f6b
commit 3878a1b212
67 changed files with 380 additions and 299 deletions

View File

@@ -371,7 +371,9 @@ HistoryWidget::HistoryWidget(
_topBar->hide();
_scroll->hide();
_keyboard = _kbScroll->setOwnedWidget(object_ptr<BotKeyboard>(this));
_keyboard = _kbScroll->setOwnedWidget(object_ptr<BotKeyboard>(
&session(),
this));
_kbScroll->hide();
updateScrollColors();
@@ -1039,7 +1041,7 @@ void HistoryWidget::updateInlineBotQuery() {
if (!_history) {
return;
}
const auto query = ParseInlineBotQuery(_field);
const auto query = ParseInlineBotQuery(&session(), _field);
if (_inlineBotUsername != query.username) {
_inlineBotUsername = query.username;
if (_inlineBotResolveRequestId) {
@@ -1780,7 +1782,7 @@ void HistoryWidget::showHistory(
_contactStatus = nullptr;
// Unload lottie animations.
Auth().data().unloadHeavyViewParts(HistoryInner::ElementDelegate());
session().data().unloadHeavyViewParts(HistoryInner::ElementDelegate());
if (peerId) {
_peer = session().data().peer(peerId);
@@ -3841,7 +3843,7 @@ void HistoryWidget::inlineBotResolveDone(
}();
session().data().processChats(data.vchats());
const auto query = ParseInlineBotQuery(_field);
const auto query = ParseInlineBotQuery(&session(), _field);
if (_inlineBotUsername == query.username) {
applyInlineBotQuery(
query.lookingUpBot ? resolvedBot : query.bot,