mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 05:29:20 +03:00
Simplify save settings
This commit is contained in:
parent
fc60dc94fc
commit
f4d98130a5
12 changed files with 66 additions and 162 deletions
|
|
@ -150,6 +150,15 @@ export class AbstractViewSettings
|
|||
}).debounce(999),
|
||||
});
|
||||
}
|
||||
|
||||
addSettings(names)
|
||||
{
|
||||
names.forEach(name => {
|
||||
let prop = name[0].toLowerCase() + name.slice(1);
|
||||
this[prop] || (this[prop] = ko.observable(SettingsGet(name)));
|
||||
this[prop].subscribe(value => rl.app.Remote.saveSetting(name, value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export class AbstractViewLogin extends AbstractViewCenter {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue