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; final bool ownMessage = event.senderId == client.userID;
Alignment alignment = ownMessage ? Alignment.topRight : Alignment.topLeft; Alignment alignment = ownMessage ? Alignment.topRight : Alignment.topLeft;
Color color = Theme.of(context).secondaryHeaderColor; 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 ? nextEvent.sender.id == event.sender.id
: false; : false;
BubbleNip nip = sameSender BubbleNip nip = sameSender

View File

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

View File

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