Better display of error messages
This commit is contained in:
parent
f262c4d53f
commit
bd3052ff86
|
@ -128,18 +128,6 @@ class MessageContent extends StatelessWidget {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
case MessageTypes.BadEncrypted:
|
case MessageTypes.BadEncrypted:
|
||||||
return Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: <Widget>[
|
|
||||||
Icon(Icons.lock),
|
|
||||||
Text(
|
|
||||||
event.getLocalizedBody(context),
|
|
||||||
style: TextStyle(
|
|
||||||
color: textColor,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
case MessageTypes.Text:
|
case MessageTypes.Text:
|
||||||
case MessageTypes.Reply:
|
case MessageTypes.Reply:
|
||||||
case MessageTypes.Location:
|
case MessageTypes.Location:
|
||||||
|
|
|
@ -195,7 +195,7 @@ extension LocalizedBody on Event {
|
||||||
break;
|
break;
|
||||||
case MessageTypes.BadEncrypted:
|
case MessageTypes.BadEncrypted:
|
||||||
localizedBody =
|
localizedBody =
|
||||||
I18n.of(context).couldNotDecryptMessage + ": " + body;
|
"🔒 " + I18n.of(context).couldNotDecryptMessage + ": " + body;
|
||||||
break;
|
break;
|
||||||
case MessageTypes.Text:
|
case MessageTypes.Text:
|
||||||
case MessageTypes.Notice:
|
case MessageTypes.Notice:
|
||||||
|
|
Loading…
Reference in a new issue