lib/screens/chat_screen.dart
.. .. @@ -56,6 +56,18 @@ 56 56 final prefs = await SharedPreferences.getInstance(); 57 57 _lastSeq = prefs.getInt('lastSeq') ?? 0; 58 58 if (!mounted) return; 59 +60 + // Listen for playback state changes to reset play button UI61 + AudioService.onPlaybackStateChanged = () {62 + if (mounted) {63 + setState(() {64 + if (!AudioService.isPlaying) {65 + _playingMessageId = null;66 + }67 + });68 + }69 + };70 +59 71 _initConnection(); 60 72 } 61 73