From bdf285062fb5ae5798ac75517a3e4296a78bb363 Mon Sep 17 00:00:00 2001 From: H3CoF6 <1707889225@qq.com> Date: Wed, 29 Apr 2026 08:25:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8B=E8=BD=BD=E4=BC=9A?= =?UTF-8?q?=E8=AF=9D=E9=80=89=E6=8B=A9=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/SettingsPage.tsx | 79 ++++++++++++++++++++++---------------- 1 file changed, 45 insertions(+), 34 deletions(-) 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 (
强制微信在接收图片时下载高清原图。建议仅在必要会话中开启以节省流量和空间。