Skip to content

Commit

Permalink
fix: reload user preferences after signing in
Browse files Browse the repository at this point in the history
  • Loading branch information
arielsvg committed Oct 27, 2020
1 parent 1924308 commit 3330b20
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/assets/javascripts/services/preferencesManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ export class PreferencesManager extends ApplicationService {
this.userPreferences = (await this.application!.singletonManager!.findOrCreateSingleton(
predicate,
contentType,
FillItemContent({}),
FillItemContent({})
)) as SNUserPrefs;
this.loadingPrefs = false;
this.needsSingletonReload = false;
const didChange =
!previousRef ||
if (
previousRef?.uuid !== this.userPreferences.uuid ||
this.userPreferences.lastSyncBegan?.getTime() !==
previousRef?.lastSyncBegan?.getTime();
if (didChange) {
previousRef?.lastSyncBegan?.getTime()
) {
this.webApplication
.getAppState()
.setUserPreferences(this.userPreferences);
Expand Down

0 comments on commit 3330b20

Please sign in to comment.