* make tts response a warning

* use toString instead of typecast

* made _event without originalSent message a warning

* don't call showFirstMatch if matches is empty
pull/1544/head
ggurdin 11 months ago committed by GitHub
parent 609eff1100
commit 966ab19ae0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -40,7 +40,7 @@ class LoginController extends State<Login> {
loading = false;
});
}).catchError((e) {
final String err = e as String;
final String err = e.toString();
setState(() {
loading = false;
passwordError = err.toLocalizedString(context);

@ -78,7 +78,7 @@ class Choreographer {
void send(BuildContext context) {
debugPrint("can send message: $canSendMessage");
if (!canSendMessage) {
if (igc.igcTextData != null) {
if (igc.igcTextData != null && igc.igcTextData!.matches.isNotEmpty) {
igc.showFirstMatch(context);
}
return;

@ -134,6 +134,7 @@ class RepresentationEvent {
'timestamp': timestamp.toIso8601String(),
'senderID': senderID,
},
level: SentryLevel.warning,
);
}
final List<PangeaToken> res =

@ -11,6 +11,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_tts/flutter_tts.dart' as flutter_tts;
import 'package:matrix/matrix_api_lite/utils/logs.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
import 'package:text_to_speech/text_to_speech.dart';
class TtsController {
@ -213,6 +214,7 @@ class TtsController {
'result': result,
'text': text,
},
level: SentryLevel.warning,
);
}
} catch (e, s) {

Loading…
Cancel
Save