2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Save section expand state in Info memento.

This commit is contained in:
John Preston
2017-10-03 18:41:44 +01:00
parent c6c75a1980
commit 76b8078bd9
21 changed files with 196 additions and 68 deletions

View File

@@ -184,6 +184,16 @@ SectionWithToggle *SectionWithToggle::setToggleShown(
return this;
}
void SectionWithToggle::toggle(bool toggled) {
if (_toggle) {
_toggle->setChecked(toggled);
}
}
bool SectionWithToggle::toggled() const {
return _toggle ? _toggle->checked() : false;
}
rpl::producer<bool> SectionWithToggle::toggledValue() const {
if (_toggle) {
return rpl::single(_toggle->checked())