mirror of
https://github.com/vale981/tdesktop
synced 2025-03-05 09:41:41 -05:00
Use qualified names for App::main and App::wnd.
This commit is contained in:
parent
2eb3041c1f
commit
c259921269
2 changed files with 9 additions and 9 deletions
|
@ -1529,12 +1529,12 @@ namespace App {
|
|||
}
|
||||
setLaunchState(QuitRequested);
|
||||
|
||||
if (auto window = wnd()) {
|
||||
if (auto window = App::wnd()) {
|
||||
if (!Sandbox::isSavingSession()) {
|
||||
window->hide();
|
||||
}
|
||||
}
|
||||
if (auto mainwidget = main()) {
|
||||
if (auto mainwidget = App::main()) {
|
||||
mainwidget->saveDraftToCloud();
|
||||
}
|
||||
Messenger::QuitAttempt();
|
||||
|
|
|
@ -38,19 +38,19 @@ void CallDelayed(int duration, FnMut<void()> &&lambda) {
|
|||
} // namespace internal
|
||||
|
||||
void sendBotCommand(PeerData *peer, UserData *bot, const QString &cmd, MsgId replyTo) {
|
||||
if (auto m = main()) {
|
||||
if (auto m = App::main()) {
|
||||
m->sendBotCommand(peer, bot, cmd, replyTo);
|
||||
}
|
||||
}
|
||||
|
||||
void hideSingleUseKeyboard(const HistoryItem *msg) {
|
||||
if (auto m = main()) {
|
||||
if (auto m = App::main()) {
|
||||
m->hideSingleUseKeyboard(msg->history()->peer, msg->id);
|
||||
}
|
||||
}
|
||||
|
||||
bool insertBotCommand(const QString &cmd) {
|
||||
if (auto m = main()) {
|
||||
if (auto m = App::main()) {
|
||||
return m->insertBotCommand(cmd);
|
||||
}
|
||||
return false;
|
||||
|
@ -82,7 +82,7 @@ void activateBotCommand(
|
|||
|
||||
case ButtonType::Callback:
|
||||
case ButtonType::Game: {
|
||||
if (auto m = main()) {
|
||||
if (auto m = App::main()) {
|
||||
m->app_sendBotCallback(button, msg, row, column);
|
||||
}
|
||||
} break;
|
||||
|
@ -149,7 +149,7 @@ void activateBotCommand(
|
|||
}
|
||||
|
||||
void searchByHashtag(const QString &tag, PeerData *inPeer) {
|
||||
if (const auto m = main()) {
|
||||
if (const auto m = App::main()) {
|
||||
Ui::hideSettingsAndLayer();
|
||||
Messenger::Instance().hideMediaView();
|
||||
if (inPeer && (!inPeer->isChannel() || inPeer->isMegagroup())) {
|
||||
|
@ -164,13 +164,13 @@ void searchByHashtag(const QString &tag, PeerData *inPeer) {
|
|||
}
|
||||
|
||||
void showSettings() {
|
||||
if (auto w = wnd()) {
|
||||
if (auto w = App::wnd()) {
|
||||
w->showSettings();
|
||||
}
|
||||
}
|
||||
|
||||
void activateClickHandler(ClickHandlerPtr handler, ClickContext context) {
|
||||
crl::on_main(wnd(), [=] {
|
||||
crl::on_main(App::wnd(), [=] {
|
||||
handler->onClick(context);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue