From 020cb42e382152cd1d0bc1f6c77a09fd23b6192a Mon Sep 17 00:00:00 2001 From: Adrian Castro <22133246+castdrian@users.noreply.github.com> Date: Wed, 27 Mar 2024 14:59:44 +0100 Subject: [PATCH] fix: typo --- apps/expo/src/components/player/VideoPlayer.tsx | 4 ++-- apps/expo/src/stores/settings/index.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/expo/src/components/player/VideoPlayer.tsx b/apps/expo/src/components/player/VideoPlayer.tsx index 63f2d54..7fd02b0 100644 --- a/apps/expo/src/components/player/VideoPlayer.tsx +++ b/apps/expo/src/components/player/VideoPlayer.tsx @@ -75,7 +75,7 @@ export const VideoPlayer = () => { const setMeta = usePlayerStore((state) => state.setMeta); const { gestureControls, autoPlay } = usePlayerSettingsStore(); - const { updateWatchHistory, removeFromWatchHistory, getWatchHistorItem } = + const { updateWatchHistory, removeFromWatchHistory, getWatchHistoryItem } = useWatchHistoryStore(); const updateResizeMode = (newMode: ResizeMode) => { @@ -242,7 +242,7 @@ export const VideoPlayer = () => { if (meta) { const media = convertMetaToScrapeMedia(meta); - const watchHistoryItem = getWatchHistorItem(media); + const watchHistoryItem = getWatchHistoryItem(media); if (watchHistoryItem) { void videoRef.setPositionAsync(watchHistoryItem.positionMillis); diff --git a/apps/expo/src/stores/settings/index.ts b/apps/expo/src/stores/settings/index.ts index 941f66e..bf981cd 100644 --- a/apps/expo/src/stores/settings/index.ts +++ b/apps/expo/src/stores/settings/index.ts @@ -142,7 +142,7 @@ interface WatchHistoryItem { interface WatchHistoryStoreState { watchHistory: WatchHistoryItem[]; hasWatchHistoryItem: (item: ItemData) => boolean; - getWatchHistorItem: (media: ScrapeMedia) => WatchHistoryItem | undefined; + getWatchHistoryItem: (media: ScrapeMedia) => WatchHistoryItem | undefined; setWatchHistory: (watchHistory: WatchHistoryItem[]) => void; updateWatchHistory: ( item: ItemData, @@ -165,7 +165,7 @@ export const useWatchHistoryStore = create< (historyItem) => historyItem.item.id === item.id, ), ), - getWatchHistorItem: (media: ScrapeMedia) => + getWatchHistoryItem: (media: ScrapeMedia) => get().watchHistory.find((historyItem) => { if (historyItem.media.type === "movie" && media.type === "movie") { return historyItem.media.tmdbId === media.tmdbId;