diff --git a/lib/hooks/useMediaQuery.ts b/lib/hooks/useMediaQuery.ts index b29157b..665c47c 100644 --- a/lib/hooks/useMediaQuery.ts +++ b/lib/hooks/useMediaQuery.ts @@ -2,6 +2,9 @@ * useMediaQuery Hook * 媒体查询 Hook - 监听浏览器媒体查询状态变化 * + * Note: Ready-to-use utility hook for responsive features. + * Currently not in active use but available for future enhancements. + * * 遵循 Liquid Glass 设计系统原则: * - 响应式设计优先 * - 性能优化(使用 matchMedia API) diff --git a/lib/store/history-store.ts b/lib/store/history-store.ts index 7857868..f0f1bff 100644 --- a/lib/store/history-store.ts +++ b/lib/store/history-store.ts @@ -25,16 +25,6 @@ interface HistoryStore { episodes?: Episode[] ) => void; - updateProgress: ( - videoId: string | number, - source: string, - episodeIndex: number, - position: number, - duration: number - ) => void; - - getHistory: () => VideoHistoryItem[]; - getHistoryItem: (videoId: string | number, source: string) => VideoHistoryItem | undefined; removeFromHistory: (videoId: string | number, source: string) => void; clearHistory: () => void; } @@ -121,35 +111,6 @@ export const useHistoryStore = create()( }); }, - updateProgress: (videoId, source, episodeIndex, position, duration) => { - set((state) => { - const newHistory = state.viewingHistory.map((item) => { - if (item.videoId === videoId && item.source === source) { - return { - ...item, - episodeIndex, - playbackPosition: position, - duration, - timestamp: Date.now(), - }; - } - return item; - }); - - return { viewingHistory: newHistory }; - }); - }, - - getHistory: () => { - return get().viewingHistory; - }, - - getHistoryItem: (videoId, source) => { - return get().viewingHistory.find( - (item) => item.videoId === videoId && item.source === source - ); - }, - removeFromHistory: (videoId, source) => { set((state) => ({ viewingHistory: state.viewingHistory.filter(