chore: use more specific substring to check for temporary event IDs (#3508)
This commit is contained in:
parent
1266e9e6f0
commit
37341eccc5
3 changed files with 8 additions and 5 deletions
|
|
@ -513,12 +513,11 @@ class PangeaMessageEvent {
|
|||
return repLocal?.content;
|
||||
}
|
||||
|
||||
if (eventId.contains("web")) return null;
|
||||
if (eventId.contains("Pangea Chat")) return null;
|
||||
|
||||
// should this just be the original event body?
|
||||
// worth a conversation with the team
|
||||
final PangeaRepresentation? basis =
|
||||
(originalWritten ?? originalSent)?.content;
|
||||
final PangeaRepresentation? basis = originalSent?.content;
|
||||
|
||||
// clear representations cache so the new representation event can be added
|
||||
// when next requested
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ extension EventsRoomExtension on Room {
|
|||
}) async {
|
||||
try {
|
||||
Sentry.addBreadcrumb(Breadcrumb(data: content));
|
||||
if (parentEventId.contains("web")) {
|
||||
if (parentEventId.contains("Pangea Chat")) {
|
||||
debugger(when: kDebugMode);
|
||||
Sentry.addBreadcrumb(
|
||||
Breadcrumb(
|
||||
|
|
|
|||
|
|
@ -393,7 +393,11 @@ class SelectModeButtonsState extends State<SelectModeButtons> {
|
|||
langCode: l1Code!,
|
||||
);
|
||||
|
||||
widget.overlayController.setTranslation(rep!.text);
|
||||
if (rep == null) {
|
||||
throw Exception('Representation is null');
|
||||
}
|
||||
|
||||
widget.overlayController.setTranslation(rep.text);
|
||||
} catch (e, s) {
|
||||
_translationError = e.toString();
|
||||
ErrorHandler.logError(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue