|
|
|
@ -86,7 +86,6 @@ class PangeaMessageEvent {
|
|
|
|
//if no audio exists, create it
|
|
|
|
//if no audio exists, create it
|
|
|
|
//if audio exists, return it
|
|
|
|
//if audio exists, return it
|
|
|
|
Future<Event?> getAudioGlobal(String langCode) async {
|
|
|
|
Future<Event?> getAudioGlobal(String langCode) async {
|
|
|
|
try {
|
|
|
|
|
|
|
|
final String text = representationByLanguage(langCode)?.text ?? body;
|
|
|
|
final String text = representationByLanguage(langCode)?.text ?? body;
|
|
|
|
|
|
|
|
|
|
|
|
final local = getAudioLocal(langCode, text);
|
|
|
|
final local = getAudioLocal(langCode, text);
|
|
|
|
@ -162,10 +161,6 @@ class PangeaMessageEvent {
|
|
|
|
|
|
|
|
|
|
|
|
debugPrint("eventId in getAudioGlobal $eventId");
|
|
|
|
debugPrint("eventId in getAudioGlobal $eventId");
|
|
|
|
return eventId != null ? room.getEventById(eventId) : null;
|
|
|
|
return eventId != null ? room.getEventById(eventId) : null;
|
|
|
|
} catch (err) {
|
|
|
|
|
|
|
|
debugPrint("error in getAudioGlobal");
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Event? getAudioLocal(String langCode, String text) {
|
|
|
|
Event? getAudioLocal(String langCode, String text) {
|
|
|
|
|