Commit Graph
6 Commits
Author SHA1 Message Date
Troray 430336c4c1 Update useSubscriptionSync.ts 2026-01-14 02:32:55 +08:00
Troray dfdeef04a7 fix: stop infinite requests after adding new subscription
Adding a new subscription triggered an infinite loop of JSON fetches
because useSubscriptionSync was subscribing to settingsStore changes,
which caused a cycle: store change → state update → sync → save →
store change.
- Remove settingsStore subscription to break the infinite loop
- Add refs to ensure sync runs only once per component mount
- Enable 5-minute cooldown to prevent redundant syncs
2026-01-14 01:43:32 +08:00
Troray beba6a6cbe fix(search): resolve infinite loop and refactor useHomePage hook
- 修复逻辑缺陷:移除了导致死循环的条件,并引入 Ref 追踪状态,解决了“无结果死循环”和“异步源加载导致的重复搜索”问题。
 - 代码重构 (DRY):新增 executeSearch 复用核心逻辑。
 - Hook 优化:完善了 useCallback 和 useEffect 的依赖管理,提升 React 渲染性能。
2026-01-11 00:35:16 +08:00
Troray 19e9c37d71 移除了未使用的getSiteConfig()函数,除了不必要的get访问器,一些优化 2026-01-02 09:38:38 +08:00
Troray beae13fa1e 修复README.md代码块语言标识 2026-01-02 09:37:01 +08:00
Troray 9adb951c66 feature/site-meta
通过环境命令设置站点名称、描述
2026-01-02 07:57:25 +08:00