From 264ffb8b388c03545767270a3f9bea4b02c7b0a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8F=B2=E6=82=A6?=
Date: Wed, 7 Jan 2026 17:53:13 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=88=E6=92=AD=E6=94=BE?=
=?UTF-8?q?=E5=99=A8=EF=BC=89=EF=BC=9A=E6=A0=87=E5=87=86=E5=8C=96=E4=BC=A0?=
=?UTF-8?q?=E9=80=92=E7=BB=99=E7=82=B9=E8=B5=9E=E5=A4=84=E7=90=86=E5=99=A8?=
=?UTF-8?q?=E7=9A=84=E6=AD=8C=E6=9B=B2=E5=AF=B9=E8=B1=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
确保传递给toggleLike的是一个具有标准化source属性的新对象引用。这解决了平台/source属性不匹配的潜在问题,并确保状态更新能够正确触发。
---
index.html | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/index.html b/index.html
index 9401e39..cc981c6 100644
--- a/index.html
+++ b/index.html
@@ -637,12 +637,19 @@
{currentSong.artist} {currentSong.album ? `· ${currentSong.album}` : ''}
- { e.stopPropagation(); toggleLike(currentSong); }}
- />
+ {
+ e.stopPropagation();
+ // Ensure we pass a clean object copy with normalized source to trigger updates correctly
+ toggleLike({
+ ...currentSong,
+ source: currentSong.platform || currentSong.source
+ });
+ }}
+ />