Show decrypt error

This commit is contained in:
Christian Pauly 2020-02-18 08:13:20 +01:00
parent 5485666356
commit 775b22389d
4 changed files with 21 additions and 4 deletions

View file

@ -127,6 +127,19 @@ class MessageContent extends StatelessWidget {
),
),
);
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.Reply:
case MessageTypes.Location:

View file

@ -193,6 +193,10 @@ extension LocalizedBody on Event {
case MessageTypes.Emote:
localizedBody = "* $body";
break;
case MessageTypes.BadEncrypted:
localizedBody =
I18n.of(context).couldNotDecryptMessage + ": " + body;
break;
case MessageTypes.Text:
case MessageTypes.Notice:
case MessageTypes.None:

View file

@ -124,8 +124,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: d6e59370668c697a97fefea32c0cdedfb235203b
resolved-ref: d6e59370668c697a97fefea32c0cdedfb235203b
ref: "083dd8eb295f0c6624e78d54f2ffeaa30de5de41"
resolved-ref: "083dd8eb295f0c6624e78d54f2ffeaa30de5de41"
url: "https://gitlab.com/famedly/famedlysdk.git"
source: git
version: "0.0.1"
@ -274,7 +274,7 @@ packages:
name: intl
url: "https://pub.dartlang.org"
source: hosted
version: "0.16.0"
version: "0.16.1"
intl_translation:
dependency: "direct main"
description:

View file

@ -27,7 +27,7 @@ dependencies:
famedlysdk:
git:
url: https://gitlab.com/famedly/famedlysdk.git
ref: bf23664ccd106fd46ec95a57fb9434a056f8c1a9
ref: 083dd8eb295f0c6624e78d54f2ffeaa30de5de41
localstorage: ^3.0.1+4
bubble: ^1.1.9+1