diff --git a/src/pages/SettingsPage.tsx b/src/pages/SettingsPage.tsx index 09bca0a..fb53979 100644 --- a/src/pages/SettingsPage.tsx +++ b/src/pages/SettingsPage.tsx @@ -1055,11 +1055,11 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) { } useEffect(() => { - if (activeTab !== 'antiRevoke' && activeTab !== 'insight') return + if (activeTab !== 'antiRevoke' && activeTab !== 'insight' && activeTab !== 'autoDownload') return let canceled = false ;(async () => { try { - if (activeTab === 'antiRevoke') { + if (activeTab === 'antiRevoke' || activeTab === 'autoDownload') { await ensureAntiRevokeSessionsLoaded() } else { await ensureChatSessionsLoaded() @@ -4701,12 +4701,13 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) { ) const renderAutoDownloadTab = () => { - const sortedSessions = [...chatSessions].sort((a, b) => (b.sortTimestamp || 0) - (a.sortTimestamp || 0)) + const sortedSessions = [...antiRevokeSessions].sort((a, b) => (b.sortTimestamp || 0) - (a.sortTimestamp || 0)) const keyword = autoDownloadSearchKeyword.trim().toLowerCase() const filteredSessions = sortedSessions.filter((session) => { if (!keyword) return true - return (session.displayName || '').toLowerCase().includes(keyword) || - session.username.toLowerCase().includes(keyword) + const displayName = String(session.displayName || '').toLowerCase() + const username = String(session.username || '').toLowerCase() + return displayName.includes(keyword) || username.includes(keyword) }) const filteredSessionIds = filteredSessions.map((session) => session.username) const selectedCount = autoDownloadSelectedIds.size @@ -4718,7 +4719,6 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) { const whitelistArr = Array.from(ids) configService.setAutoDownloadWhitelist(whitelistArr) if (autoDownloadHighRes) { - // 转换为 wxid\0wxid\0wxid\0\0 格式 const whitelistStr = whitelistArr.length > 0 ? (whitelistArr.join('\0') + '\0\0') : ''; (window as any).electronAPI.image.startAutoDownload(whitelistStr) } @@ -4747,10 +4747,10 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) { return (
强制微信在接收图片时下载高清原图。建议仅在必要会话中开启以节省流量和空间。