mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
Separate form controller from view controller.
This commit is contained in:
@@ -111,11 +111,13 @@ void ConfirmBox::prepare() {
|
||||
if (!_informative) {
|
||||
addButton([this] { return _cancelText; }, [this] { _cancelled = true; closeBox(); });
|
||||
}
|
||||
subscribe(boxClosing, [this] {
|
||||
|
||||
boxClosing() | rpl::start_with_next([=] {
|
||||
if (!_confirmed && (!_strictCancel || _cancelled) && _cancelledCallback) {
|
||||
_cancelledCallback();
|
||||
}
|
||||
});
|
||||
}, lifetime());
|
||||
|
||||
textUpdated();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user