mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
Allow not type-erased producers.
This commit is contained in:
@@ -185,11 +185,12 @@ SectionWithToggle *SectionWithToggle::setToggleShown(
|
||||
}
|
||||
|
||||
rpl::producer<bool> SectionWithToggle::toggledValue() const {
|
||||
return _toggle
|
||||
? (rpl::single(_toggle->checked())
|
||||
if (_toggle) {
|
||||
return rpl::single(_toggle->checked())
|
||||
| rpl::then(
|
||||
base::ObservableViewer(_toggle->checkedChanged)))
|
||||
: rpl::never<bool>();
|
||||
base::ObservableViewer(_toggle->checkedChanged));
|
||||
}
|
||||
return rpl::never<bool>();
|
||||
}
|
||||
|
||||
rpl::producer<bool> SectionWithToggle::toggleShownValue() const {
|
||||
|
Reference in New Issue
Block a user