Update lib/components/list_items/message.dart, lib/utils/event_extension.dart files
This commit is contained in:
parent
9e42e8c275
commit
7f84729974
|
@ -55,7 +55,7 @@ class Message extends StatelessWidget {
|
|||
MainAxisAlignment rowMainAxisAlignment =
|
||||
ownMessage ? MainAxisAlignment.end : MainAxisAlignment.start;
|
||||
|
||||
if ([EventTypes.Message, EventTypes.Sticker].contains(event.type) && event.showThumbnail) {
|
||||
if (event.showThumbnail) {
|
||||
color = Theme.of(context).scaffoldBackgroundColor.withOpacity(0.66);
|
||||
textColor = Theme.of(context).textTheme.bodyText2.color;
|
||||
} else if (ownMessage) {
|
||||
|
|
|
@ -19,9 +19,10 @@ extension LocalizedBody on Event {
|
|||
}
|
||||
|
||||
bool get showThumbnail =>
|
||||
kIsWeb ||
|
||||
[EventTypes.Message, EventTypes.Sticker].contains(type) &&
|
||||
(kIsWeb ||
|
||||
(content['info'] is Map &&
|
||||
content['info']['size'] < room.client.store.maxFileSize);
|
||||
content['info']['size'] < room.client.store.maxFileSize));
|
||||
|
||||
String get sizeString {
|
||||
if (content["info"] is Map<String, dynamic> &&
|
||||
|
|
Loading…
Reference in a new issue