Browse Source

fix(agent): 修复声音条动画显示条件判断

添加shouldShowAnimation变量来同时判断isListening和isPushToTalkActive状态,确保在两种情况下都能正确显示动画
weicu
lxm 1 year ago
parent
commit
49bc1f3cc1
  1. 4
      lib/modules/agent/widgets/sound_bar_widget.dart

4
lib/modules/agent/widgets/sound_bar_widget.dart

@ -134,8 +134,10 @@ class AgentSoundBarsWidget extends StatelessWidget {
Widget build(BuildContext context) {
return Obx(() {
final controller = Get.find<AgentController>();
final shouldShowAnimation =
controller.isListening.value || controller.isPushToTalkActive.value;
return SoundBarsWidget(
isActive: controller.isListening.value,
isActive: shouldShowAnimation,
barCount: barCount,
);
});

Loading…
Cancel
Save