mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Apply styles using user events and also immediately when changed.
This commit is contained in:
parent
99c902a1a1
commit
8d59d2a0fe
2 changed files with 48 additions and 55 deletions
|
@ -21,9 +21,6 @@ const defaultSubtitleAppearanceSettings = {
|
|||
|
||||
export class UserSettings {
|
||||
constructor() {
|
||||
this._userSetPromise = new Promise(resolve => {
|
||||
this._userSetPromiseResolve = resolve;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -39,11 +36,6 @@ export class UserSettings {
|
|||
this.currentUserId = userId;
|
||||
this.currentApiClient = apiClient;
|
||||
|
||||
if (this._userSetPromiseResolve) {
|
||||
this._userSetPromiseResolve();
|
||||
this._userSetPromiseResolve = null;
|
||||
}
|
||||
|
||||
if (!userId) {
|
||||
this.displayPrefs = null;
|
||||
return Promise.resolve();
|
||||
|
@ -67,14 +59,6 @@ export class UserSettings {
|
|||
this.displayPrefs = instance.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows waiting until the user id is set.
|
||||
* @returns {Promise}
|
||||
*/
|
||||
userIsSet() {
|
||||
return this._userSetPromise;
|
||||
}
|
||||
|
||||
// FIXME: 'appSettings.set' doesn't return any value
|
||||
/**
|
||||
* Set value of setting.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue