mirror of
https://github.com/Jellify-Music/App.git
synced 2026-01-07 03:20:19 -06:00
library needs to be persisted
This commit is contained in:
@@ -27,8 +27,6 @@ export default class Client {
|
||||
const serverJson = storage.getString(MMKVStorageKeys.Server);
|
||||
const libraryJson = storage.getString(MMKVStorageKeys.Library);
|
||||
|
||||
|
||||
|
||||
if (user)
|
||||
this.setAndPersistUser(user)
|
||||
else if (userJson)
|
||||
@@ -159,6 +157,7 @@ export default class Client {
|
||||
}
|
||||
|
||||
public static setLibrary(library : JellifyLibrary) : void {
|
||||
Client.#instance.library = library
|
||||
|
||||
Client.#instance = new Client(undefined, undefined, undefined, library);
|
||||
}
|
||||
}
|
||||
@@ -69,7 +69,7 @@ export function fetchFavoriteAlbums(): Promise<BaseItemDto[]> {
|
||||
}
|
||||
|
||||
export function fetchFavoriteTracks(): Promise<BaseItemDto[]> {
|
||||
console.debug(`Fetching user's favorite artists`);
|
||||
console.debug(`Fetching user's favorite tracks`);
|
||||
|
||||
return new Promise(async (resolve, reject) => {
|
||||
getItemsApi(Client.api!)
|
||||
|
||||
Reference in New Issue
Block a user