2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 17:15:16 +00:00

Notifications management moved to AuthSession.

Also implemented Global::WorkMode() as an base::Variable.
This commit is contained in:
John Preston
2017-03-04 22:36:59 +03:00
parent b14ba398e6
commit 81790b2271
80 changed files with 1299 additions and 1152 deletions

View File

@@ -425,6 +425,15 @@ QString Widget::Step::nextButtonText() const {
}
void Widget::Step::finish(const MTPUser &user, QImage photo) {
if (user.type() != mtpc_user || !user.c_user().is_self()) {
// No idea what to do here.
// We could've reset intro and MTP, but this really should not happen.
Ui::show(Box<InformBox>("Internal error: bad user.is_self() after sign in."));
return;
}
Messenger::Instance().authSessionCreate(user.c_user().vid.v);
App::wnd()->setupMain(&user);
// "this" is already deleted here by creating the main widget.