diff --git a/frontend/src/helperComponents/Pagination.svelte b/frontend/src/helperComponents/Pagination.svelte
index 0acaf50..061bc03 100644
--- a/frontend/src/helperComponents/Pagination.svelte
+++ b/frontend/src/helperComponents/Pagination.svelte
@@ -1,6 +1,7 @@
diff --git a/frontend/src/helperModules/CheckIfAniListLoggedInAndLoadWatchList.svelte b/frontend/src/helperModules/CheckIfAniListLoggedInAndLoadWatchList.svelte
index f278c28..cebdd5c 100644
--- a/frontend/src/helperModules/CheckIfAniListLoggedInAndLoadWatchList.svelte
+++ b/frontend/src/helperModules/CheckIfAniListLoggedInAndLoadWatchList.svelte
@@ -1,34 +1,47 @@
\ No newline at end of file
+ aniListLoggedIn.set(loggedIn);
+ };
+
diff --git a/frontend/src/helperModules/GlobalVariablesAndHelperFunctions.svelte b/frontend/src/helperModules/GlobalVariablesAndHelperFunctions.svelte
index 41c03a8..50bacec 100644
--- a/frontend/src/helperModules/GlobalVariablesAndHelperFunctions.svelte
+++ b/frontend/src/helperModules/GlobalVariablesAndHelperFunctions.svelte
@@ -53,6 +53,7 @@
export let loading = writable(false);
export let tableItems = writable([] as TableItems);
export let watchlistNeedsRefresh = writable(false);
+ export let aniListSort = writable(MediaListSort.UpdatedTimeDesc);
export let watchListPage = writable(1);
export let animePerPage = writable(20);
@@ -60,6 +61,7 @@
let isAniListPrimary: boolean;
let page: number;
let perPage: number;
+ let sort: string;
let aniWatchlist: AniListCurrentUserWatchList;
let currentAniListAnime: AniListGetSingleAnime;
@@ -73,6 +75,7 @@
malLoggedIn.subscribe((value) => (isMalLoggedIn = value));
simklLoggedIn.subscribe((value) => (isSimklLoggedIn = value));
aniListAnime.subscribe((value) => (currentAniListAnime = value));
+ aniListSort.subscribe((value) => (sort = value));
export async function GetAnimeSingleItem(
aniId: number,
@@ -136,11 +139,7 @@
GetAniListLoggedInUser().then((result) => {
aniListUser.set(result);
if (isAniListPrimary) {
- GetAniListUserWatchingList(
- page,
- perPage,
- MediaListSort.UpdatedTimeDesc,
- ).then((result) => {
+ GetAniListUserWatchingList(page, perPage, sort).then((result) => {
aniListWatchlist.set(result);
aniListLoggedIn.set(true);
});
@@ -184,4 +183,3 @@
});
}
-