[APP-643] Account preferences server sync (#615)
* Bump deps * Bump deps * Add server sync of content preferences and an adult content toggle
This commit is contained in:
parent
c2a8713ff4
commit
75007d8fae
5 changed files with 158 additions and 19 deletions
|
|
@ -37,7 +37,7 @@ export class RootStoreModel {
|
|||
log = new LogModel()
|
||||
session = new SessionModel(this)
|
||||
shell = new ShellUiModel(this)
|
||||
preferences = new PreferencesModel()
|
||||
preferences = new PreferencesModel(this)
|
||||
me = new MeModel(this)
|
||||
invitedUsers = new InvitedUsers(this)
|
||||
profiles = new ProfilesCache(this)
|
||||
|
|
@ -126,6 +126,7 @@ export class RootStoreModel {
|
|||
this.log.debug('RootStoreModel:handleSessionChange')
|
||||
this.agent = agent
|
||||
this.me.clear()
|
||||
/* dont await */ this.preferences.sync()
|
||||
await this.me.load()
|
||||
if (!hadSession) {
|
||||
resetNavigation()
|
||||
|
|
@ -161,6 +162,7 @@ export class RootStoreModel {
|
|||
}
|
||||
try {
|
||||
await this.me.updateIfNeeded()
|
||||
await this.preferences.sync()
|
||||
} catch (e: any) {
|
||||
this.log.error('Failed to fetch latest state', e)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue