aboutsummaryrefslogtreecommitdiff
path: root/src/lib/List
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/List')
-rw-r--r--src/lib/List/Anime/CompletedAnimeList.svelte6
-rw-r--r--src/lib/List/Anime/DueAnimeList.svelte15
-rw-r--r--src/lib/List/Anime/UpcomingAnimeList.svelte7
-rw-r--r--src/lib/List/Manga/MangaListTemplate.svelte16
4 files changed, 22 insertions, 22 deletions
diff --git a/src/lib/List/Anime/CompletedAnimeList.svelte b/src/lib/List/Anime/CompletedAnimeList.svelte
index 0c610216..bd9df8d7 100644
--- a/src/lib/List/Anime/CompletedAnimeList.svelte
+++ b/src/lib/List/Anime/CompletedAnimeList.svelte
@@ -6,17 +6,21 @@
import lastPruneTimes from '$stores/lastPruneTimes';
import settings from '$stores/settings';
import AnimeList from './AnimeListTemplate.svelte';
+ import { getNotificationsContext } from 'svelte-notifications';
export let user: AniListAuthorisation;
export let identity: UserIdentity;
+ const { addNotification } = getNotificationsContext();
let animeLists: Promise<Media[]>;
let startTime: number;
let endTime: number;
onMount(async () => {
startTime = performance.now();
- animeLists = mediaListCollection(user, identity, Type.Anime, $anime, $lastPruneTimes.anime);
+ animeLists = mediaListCollection(user, identity, Type.Anime, $anime, $lastPruneTimes.anime, {
+ addNotification
+ });
});
const cleanMedia = (anime: Media[]) => {
diff --git a/src/lib/List/Anime/DueAnimeList.svelte b/src/lib/List/Anime/DueAnimeList.svelte
index 750d773b..f4439c8b 100644
--- a/src/lib/List/Anime/DueAnimeList.svelte
+++ b/src/lib/List/Anime/DueAnimeList.svelte
@@ -8,7 +8,6 @@
import AnimeList from './AnimeListTemplate.svelte';
import type { SubsPlease } from '$lib/Media/Anime/Airing/Subtitled/subsPlease';
import { injectAiringTime } from '$lib/Media/Anime/Airing/Subtitled/match';
- import { options } from '$lib/Notification/options';
import { getNotificationsContext } from 'svelte-notifications';
export let user: AniListAuthorisation;
@@ -23,20 +22,16 @@
startTime = performance.now();
endTime = -1;
animeLists = mediaListCollection(user, identity, Type.Anime, $anime, $lastPruneTimes.anime, {
- forcePrune: true
+ forcePrune: true,
+ addNotification
});
-
- addNotification(
- options({
- heading: 'Anime',
- description: 'Re-cached from AniList'
- })
- );
}, $settings.cacheMinutes * 1000 * 60);
onMount(async () => {
startTime = performance.now();
- animeLists = mediaListCollection(user, identity, Type.Anime, $anime, $lastPruneTimes.anime);
+ animeLists = mediaListCollection(user, identity, Type.Anime, $anime, $lastPruneTimes.anime, {
+ addNotification
+ });
});
onDestroy(() => clearInterval(keyCacher));
diff --git a/src/lib/List/Anime/UpcomingAnimeList.svelte b/src/lib/List/Anime/UpcomingAnimeList.svelte
index 46a42e1d..cdcf23c0 100644
--- a/src/lib/List/Anime/UpcomingAnimeList.svelte
+++ b/src/lib/List/Anime/UpcomingAnimeList.svelte
@@ -7,17 +7,22 @@
import AnimeList from './AnimeListTemplate.svelte';
import settings from '$stores/settings';
import type { SubsPlease } from '$lib/Media/Anime/Airing/Subtitled/subsPlease';
+ import { getNotificationsContext } from 'svelte-notifications';
export let user: AniListAuthorisation;
export let identity: UserIdentity;
+ const { addNotification } = getNotificationsContext();
let animeLists: Promise<Media[]>;
let startTime: number;
let endTime: number;
onMount(async () => {
startTime = performance.now();
- animeLists = mediaListCollection(user, identity, Type.Anime, $anime, $lastPruneTimes.anime);
+ animeLists = mediaListCollection(user, identity, Type.Anime, $anime, $lastPruneTimes.anime, {
+ addNotification,
+ notificationType: 'Upcoming Episodes'
+ });
});
const cleanMedia = (
diff --git a/src/lib/List/Manga/MangaListTemplate.svelte b/src/lib/List/Manga/MangaListTemplate.svelte
index 97f020be..388ef543 100644
--- a/src/lib/List/Manga/MangaListTemplate.svelte
+++ b/src/lib/List/Manga/MangaListTemplate.svelte
@@ -14,7 +14,6 @@
import authorisedJson from '$lib/authorised.json';
import { incrementMediaProgress } from '$lib/Media/Anime/cache';
import { getNotificationsContext } from 'svelte-notifications';
- import { options } from '$lib/Notification/options';
export let user: AniListAuthorisation;
export let identity: UserIdentity;
@@ -36,19 +35,16 @@
const keyCacher = setInterval(() => {
startTime = performance.now();
endTime = -1;
- mangaLists = mediaListCollection(user, identity, Type.Manga, $manga, $lastPruneTimes.manga);
-
- addNotification(
- options({
- heading: 'Manga',
- description: 'Re-cached media lists from AniList'
- })
- );
+ mangaLists = mediaListCollection(user, identity, Type.Manga, $manga, $lastPruneTimes.manga, {
+ addNotification
+ });
}, $settings.cacheMinutes * 1000 * 60);
onMount(async () => {
startTime = performance.now();
- mangaLists = mediaListCollection(user, identity, Type.Manga, $manga, $lastPruneTimes.manga);
+ mangaLists = mediaListCollection(user, identity, Type.Manga, $manga, $lastPruneTimes.manga, {
+ addNotification
+ });
});
onDestroy(() => clearInterval(keyCacher));