mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 12: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 setMeta = usePlayerStore((state) => state.setMeta);
|
||||||
|
|
||||||
const { gestureControls, autoPlay } = usePlayerSettingsStore();
|
const { gestureControls, autoPlay } = usePlayerSettingsStore();
|
||||||
const { updateWatchHistory, removeFromWatchHistory, getWatchHistorItem } =
|
const { updateWatchHistory, removeFromWatchHistory, getWatchHistoryItem } =
|
||||||
useWatchHistoryStore();
|
useWatchHistoryStore();
|
||||||
|
|
||||||
const updateResizeMode = (newMode: ResizeMode) => {
|
const updateResizeMode = (newMode: ResizeMode) => {
|
||||||
@@ -242,7 +242,7 @@ export const VideoPlayer = () => {
|
|||||||
|
|
||||||
if (meta) {
|
if (meta) {
|
||||||
const media = convertMetaToScrapeMedia(meta);
|
const media = convertMetaToScrapeMedia(meta);
|
||||||
const watchHistoryItem = getWatchHistorItem(media);
|
const watchHistoryItem = getWatchHistoryItem(media);
|
||||||
|
|
||||||
if (watchHistoryItem) {
|
if (watchHistoryItem) {
|
||||||
void videoRef.setPositionAsync(watchHistoryItem.positionMillis);
|
void videoRef.setPositionAsync(watchHistoryItem.positionMillis);
|
||||||
|
@@ -142,7 +142,7 @@ interface WatchHistoryItem {
|
|||||||
interface WatchHistoryStoreState {
|
interface WatchHistoryStoreState {
|
||||||
watchHistory: WatchHistoryItem[];
|
watchHistory: WatchHistoryItem[];
|
||||||
hasWatchHistoryItem: (item: ItemData) => boolean;
|
hasWatchHistoryItem: (item: ItemData) => boolean;
|
||||||
getWatchHistorItem: (media: ScrapeMedia) => WatchHistoryItem | undefined;
|
getWatchHistoryItem: (media: ScrapeMedia) => WatchHistoryItem | undefined;
|
||||||
setWatchHistory: (watchHistory: WatchHistoryItem[]) => void;
|
setWatchHistory: (watchHistory: WatchHistoryItem[]) => void;
|
||||||
updateWatchHistory: (
|
updateWatchHistory: (
|
||||||
item: ItemData,
|
item: ItemData,
|
||||||
@@ -165,7 +165,7 @@ export const useWatchHistoryStore = create<
|
|||||||
(historyItem) => historyItem.item.id === item.id,
|
(historyItem) => historyItem.item.id === item.id,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
getWatchHistorItem: (media: ScrapeMedia) =>
|
getWatchHistoryItem: (media: ScrapeMedia) =>
|
||||||
get().watchHistory.find((historyItem) => {
|
get().watchHistory.find((historyItem) => {
|
||||||
if (historyItem.media.type === "movie" && media.type === "movie") {
|
if (historyItem.media.type === "movie" && media.type === "movie") {
|
||||||
return historyItem.media.tmdbId === media.tmdbId;
|
return historyItem.media.tmdbId === media.tmdbId;
|
||||||
|
Reference in New Issue
Block a user