From d94ec97631bd8912a38761cf17c1de187262ff87 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 17 Apr 2025 10:45:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E9=9F=B3=E9=A2=91=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=90=8C=E6=AD=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/modules/chat/controllers/chat_controller.dart | 1 + lib/modules/chat/views/chat_music_card.dart | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/modules/chat/controllers/chat_controller.dart b/lib/modules/chat/controllers/chat_controller.dart index 6a58b3044..8bafd6ac3 100644 --- a/lib/modules/chat/controllers/chat_controller.dart +++ b/lib/modules/chat/controllers/chat_controller.dart @@ -489,6 +489,7 @@ class ChatController extends GetxController { await _spotifService.initialize(); _spotifService.play(card['url'] as String); isPlay.value = true; + audiourl.value = card['url'] as String; } catch (e) { Logger.error('加载异常: $e'); } diff --git a/lib/modules/chat/views/chat_music_card.dart b/lib/modules/chat/views/chat_music_card.dart index 57ac11c18..5fcce956e 100644 --- a/lib/modules/chat/views/chat_music_card.dart +++ b/lib/modules/chat/views/chat_music_card.dart @@ -43,7 +43,8 @@ class ChatMusicCard extends GetView { ), 10.horizontalSpace, Obx( - () => controller.isPlay.value + () => controller.audiourl.value == data?["url"] && + controller.isPlay.value ? GestureDetector( onTap: () { controller.pause();