From da50f756d90da9fa66c60d4aec97c751bb2d2ff5 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Thu, 28 Dec 2023 20:17:05 -0800
Subject: feat(hovercover): allow for no subs

---
 src/routes/schedule/+page.svelte | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'src/routes/schedule/+page.svelte')

diff --git a/src/routes/schedule/+page.svelte b/src/routes/schedule/+page.svelte
index f1d4d92a..9251552d 100644
--- a/src/routes/schedule/+page.svelte
+++ b/src/routes/schedule/+page.svelte
@@ -30,6 +30,7 @@
 		scheduledMediaPromise = scheduleMediaListCollection(new Date().getFullYear(), season());
 	});
 
+	let hovering = false;
 	let hoveredItem: SubsPleaseEpisode | null = null;
 	let hoveredMedia: Media | null = null;
 	let imageStyle = '';
@@ -108,14 +109,16 @@
 									<li
 										class="entry"
 										on:mouseenter={() => {
-											const response = onMouseEnter(entry, media);
+											const response = onMouseEnter(media, entry);
 
+											hovering = response.hovering;
 											hoveredItem = response.item;
 											hoveredMedia = response.media;
 										}}
 										on:mouseleave={() => {
 											const response = onMouseLeave();
 
+											hovering = response.hovering;
 											hoveredItem = response.item;
 											hoveredMedia = response.media;
 										}}
@@ -176,7 +179,7 @@
 	<Error type="Schedule" loginSessionError={false} />
 {/await}
 
-<HoverCover {hoveredItem} {hoveredMedia} {imageStyle} />
+<HoverCover {hoveredItem} {hoveredMedia} {imageStyle} {hovering} />
 
 <style>
 	#list-container {
-- 
cgit v1.2.3

