2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

stop and clear audio on logout, clearing bot keyboards in supergroups

This commit is contained in:
John Preston
2015-11-24 19:19:18 +03:00
parent c80adfc21d
commit 87b57a26ad
14 changed files with 154 additions and 28 deletions

View File

@@ -190,6 +190,9 @@ namespace App {
if (cHasPasscode()) {
cSetHasPasscode(false);
}
if (audioPlayer()) {
audioPlayer()->stopAndClear();
}
if (w) {
w->tempDirDelete(Local::ClearManagerAll);
w->notifyClearFast();
@@ -696,9 +699,8 @@ namespace App {
}
chat->botStatus = botStatus;
if (!found) {
h->lastKeyboardId = 0;
h->lastKeyboardFrom = 0;
if (App::main()) App::main()->updateBotKeyboard();
h->clearLastKeyboard();
if (App::main()) App::main()->updateBotKeyboard(h);
}
}
}
@@ -794,9 +796,8 @@ namespace App {
History *h = App::historyLoaded(chat->id);
if (h && h->lastKeyboardFrom == user->id) {
h->lastKeyboardId = 0;
h->lastKeyboardFrom = 0;
if (App::main()) App::main()->updateBotKeyboard();
h->clearLastKeyboard();
if (App::main()) App::main()->updateBotKeyboard(h);
}
}
if (chat->botStatus > 0 && user->botInfo) {