mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Remove apiclient appstorage usage
This commit is contained in:
parent
1762e95740
commit
1b7a0262ce
1 changed files with 2 additions and 3 deletions
|
@ -1,4 +1,3 @@
|
||||||
import { AppStorage } from 'jellyfin-apiclient';
|
|
||||||
import Events from '../../utils/events.ts';
|
import Events from '../../utils/events.ts';
|
||||||
import { toBoolean } from '../../utils/string.ts';
|
import { toBoolean } from '../../utils/string.ts';
|
||||||
|
|
||||||
|
@ -108,7 +107,7 @@ class AppSettings {
|
||||||
|
|
||||||
set(name, value, userId) {
|
set(name, value, userId) {
|
||||||
const currentValue = this.get(name, userId);
|
const currentValue = this.get(name, userId);
|
||||||
AppStorage.setItem(this.#getKey(name, userId), value);
|
localStorage.setItem(this.#getKey(name, userId), value);
|
||||||
|
|
||||||
if (currentValue !== value) {
|
if (currentValue !== value) {
|
||||||
Events.trigger(this, 'change', [name]);
|
Events.trigger(this, 'change', [name]);
|
||||||
|
@ -116,7 +115,7 @@ class AppSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
get(name, userId) {
|
get(name, userId) {
|
||||||
return AppStorage.getItem(this.#getKey(name, userId));
|
return localStorage.getItem(this.#getKey(name, userId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue