Merge pull request #882 from pangeachat/sentry

Sentry issue fixes
This commit is contained in:
ggurdin 2024-11-01 10:31:40 -04:00 committed by GitHub
commit 5528ba70db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -142,7 +142,7 @@ class OverlayMessageTextState extends State<OverlayMessageText> {
widget.overlayController.onClickOverlayMessageToken(
tokenPosition.token!,
);
setState(() {});
if (mounted) setState(() {});
},
text: substring,
style: style.merge(

View file

@ -45,8 +45,8 @@ class TtsController {
await tts.awaitSpeakCompletion(true);
final voices = await tts.getVoices;
availableLangCodes = (voices as List)
final voices = (await tts.getVoices) as List?;
availableLangCodes = (voices ?? [])
.map((v) {
// on iOS / web, the codes are in 'locale', but on Android, they are in 'name'
final nameCode = v['name']?.split("-").first;