mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Refactor Application to delegate state management to services
Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
566c2dbf89
commit
bcacf46f8b
4 files changed
+60
-47
No files matched your search
@@ -867,31 +867,6 @@ export default class ApplicationBootstrap {
|
||||
}
|
||||
};
|
||||
app.boundNwcSettingsToastHandler = null;
|
||||
Object.defineProperty(app, "savedProfiles", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
get() {
|
||||
return getSavedProfiles();
|
||||
},
|
||||
set(next) {
|
||||
setSavedProfiles(Array.isArray(next) ? next : [], {
|
||||
persist: false,
|
||||
persistActive: false,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
Object.defineProperty(app, "activeProfilePubkey", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
get() {
|
||||
return getActiveProfilePubkey();
|
||||
},
|
||||
set(value) {
|
||||
setStoredActiveProfilePubkey(value, { persist: false });
|
||||
},
|
||||
});
|
||||
|
||||
Object.defineProperty(app, "profileCache", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
|
||||
Reference in new issue
Block a user