mirror of
https://github.com/KuekHaoYang/KVideo.git
synced 2026-08-16 09:13:42 +08:00
feat: Integrate subscription synchronization and initialize new subscriptions with lastUpdated: 0.
This commit is contained in:
@@ -2,9 +2,11 @@ import { useState, useRef, useEffect, useCallback } from 'react';
|
||||
import { useRouter, useSearchParams } from 'next/navigation';
|
||||
import { useSearchCache } from '@/lib/hooks/useSearchCache';
|
||||
import { useParallelSearch } from '@/lib/hooks/useParallelSearch';
|
||||
import { useSubscriptionSync } from '@/lib/hooks/useSubscriptionSync';
|
||||
import { settingsStore, type SortOption } from '@/lib/store/settings-store';
|
||||
|
||||
export function useHomePage() {
|
||||
useSubscriptionSync();
|
||||
const router = useRouter();
|
||||
const searchParams = useSearchParams();
|
||||
const { loadFromCache, saveToCache } = useSearchCache();
|
||||
|
||||
@@ -131,7 +131,7 @@ export function createSubscription(name: string, url: string): SourceSubscriptio
|
||||
id: `sub_${Date.now()}_${Math.random().toString(36).substring(7)}`,
|
||||
name: name.trim() || '未命名订阅',
|
||||
url: url.trim(),
|
||||
lastUpdated: Date.now(),
|
||||
lastUpdated: 0,
|
||||
autoRefresh: true,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user