chore: stop audio on recording dialog (#2076)

This commit is contained in:
ggurdin 2025-03-07 12:28:54 -05:00 committed by GitHub
parent fb95930e31
commit f9ee18c77b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -526,6 +526,9 @@ class ChatController extends State<ChatPageWithRoom>
if (state == AppLifecycleState.paused) {
clearSelectedEvents();
}
if (state == AppLifecycleState.hidden) {
stopAudioStream.add(null);
}
// Pangea#
if (state != AppLifecycleState.resumed) return;
setReadMarker();
@ -925,6 +928,9 @@ class ChatController extends State<ChatPageWithRoom>
}
void voiceMessageAction() async {
// #Pangea
stopAudioStream.add(null);
// Pangea#
final scaffoldMessenger = ScaffoldMessenger.of(context);
if (PlatformInfos.isAndroid) {
final info = await DeviceInfoPlugin().androidInfo;

View file

@ -43,7 +43,6 @@ import '../../widgets/matrix.dart';
import 'package:fluffychat/utils/tor_stub.dart'
if (dart.library.html) 'package:tor_detector_web/tor_detector_web.dart';
enum PopupMenuAction {
settings,
invite,