Fix message bubble color

This commit is contained in:
Christian Pauly 2020-05-10 13:26:52 +02:00
parent 7f84729974
commit 2ecd8355a6
3 changed files with 21 additions and 6 deletions

View File

@ -41,7 +41,8 @@ class Message extends StatelessWidget {
final bool ownMessage = event.senderId == client.userID;
Alignment alignment = ownMessage ? Alignment.topRight : Alignment.topLeft;
Color color = Theme.of(context).secondaryHeaderColor;
final bool sameSender = nextEvent != null && [EventTypes.Message, EventTypes.Sticker].contains(nextEvent.type)
final bool sameSender = nextEvent != null &&
[EventTypes.Message, EventTypes.Sticker].contains(nextEvent.type)
? nextEvent.sender.id == event.sender.id
: false;
BubbleNip nip = sameSender

View File

@ -19,10 +19,10 @@ extension LocalizedBody on Event {
}
bool get showThumbnail =>
[EventTypes.Message, EventTypes.Sticker].contains(type) &&
[MessageTypes.Image, MessageTypes.Sticker].contains(messageType) &&
(kIsWeb ||
(content['info'] is Map &&
content['info']['size'] < room.client.store.maxFileSize));
(content['info'] is Map &&
content['info']['size'] < room.client.store.maxFileSize));
String get sizeString {
if (content["info"] is Map<String, dynamic> &&

View File

@ -117,8 +117,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: "73ed5ed093a1275f93adc946a605d46530cbdd39"
resolved-ref: "73ed5ed093a1275f93adc946a605d46530cbdd39"
ref: "4b2d4913b3e720f62698c46dfa6b17d5f0e1aa49"
resolved-ref: "4b2d4913b3e720f62698c46dfa6b17d5f0e1aa49"
url: "https://gitlab.com/famedly/famedlysdk.git"
source: git
version: "0.0.1"
@ -254,6 +254,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.14.0+3"
html_unescape:
dependency: transitive
description:
name: html_unescape
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1+3"
http:
dependency: "direct main"
description:
@ -338,6 +345,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.11.4"
markdown:
dependency: transitive
description:
name: markdown
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
matcher:
dependency: transitive
description: