mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-07 01:45:39 +00:00
Simplified confirmed callback for ConfirmBox instances.
This commit is contained in:
@@ -344,12 +344,11 @@ void CodeWidget::gotPassword(const MTPaccount_Password &result) {
|
||||
_code->setFocus();
|
||||
return;
|
||||
} else if (!getData()->pwdRequest) {
|
||||
const auto box = std::make_shared<QPointer<Ui::BoxContent>>();
|
||||
const auto callback = [=] {
|
||||
const auto callback = [=](Fn<void()> &&close) {
|
||||
Core::UpdateApplication();
|
||||
if (*box) (*box)->closeBox();
|
||||
close();
|
||||
};
|
||||
*box = Ui::show(Box<ConfirmBox>(
|
||||
Ui::show(Box<ConfirmBox>(
|
||||
tr::lng_passport_app_out_of_date(tr::now),
|
||||
tr::lng_menu_update(tr::now),
|
||||
callback));
|
||||
|
Reference in New Issue
Block a user