Fix apiclient imports
This commit is contained in:
committed by
vitorsemeano
parent
7d9208e951
commit
a71b0314d4
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable indent */
|
||||
import { appStorage, events } from 'jellyfin-apiclient';
|
||||
import { AppStorage, Events } from 'jellyfin-apiclient';
|
||||
|
||||
function getKey(name, userId) {
|
||||
if (userId) {
|
||||
@@ -80,15 +80,15 @@ import { appStorage, events } from 'jellyfin-apiclient';
|
||||
|
||||
export function set(name, value, userId) {
|
||||
const currentValue = this.get(name, userId);
|
||||
appStorage.setItem(getKey(name, userId), value);
|
||||
AppStorage.setItem(getKey(name, userId), value);
|
||||
|
||||
if (currentValue !== value) {
|
||||
events.trigger(this, 'change', [name]);
|
||||
Events.trigger(this, 'change', [name]);
|
||||
}
|
||||
}
|
||||
|
||||
export function get(name, userId) {
|
||||
return appStorage.getItem(getKey(name, userId));
|
||||
return AppStorage.getItem(getKey(name, userId));
|
||||
}
|
||||
|
||||
/* eslint-enable indent */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import appSettings from './appSettings';
|
||||
import { events } from 'jellyfin-apiclient';
|
||||
import { Events } from 'jellyfin-apiclient';
|
||||
|
||||
function onSaveTimeout() {
|
||||
const self = this;
|
||||
@@ -77,7 +77,7 @@ export class UserSettings {
|
||||
}
|
||||
|
||||
if (currentValue !== value) {
|
||||
events.trigger(this, 'change', [name]);
|
||||
Events.trigger(this, 'change', [name]);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user