mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 10:23:24 +00:00
fix: typo
This commit is contained in:
@@ -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);
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user