void SessionsBox::Inner::onTerminateAll() { if (_terminateBox) _terminateBox->deleteLater(); _terminateBox = Ui::show(Box<ConfirmBox>(lang(lng_settings_reset_sure), lang(lng_settings_reset_button), st::attentionBoxButton, base::lambda_guarded(this, [this] { if (_terminateBox) { _terminateBox->closeBox(); _terminateBox = nullptr; } MTP::send(MTPauth_ResetAuthorizations(), rpcDone(&Inner::terminateAllDone), rpcFail(&Inner::terminateAllFail)); emit terminateAll(); })), LayerOption::KeepOther); }
void SettingsInner::onResetSessions() { MTP::send(MTPauth_ResetAuthorizations(), rpcDone(&SettingsInner::doneResetSessions)); }