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 =
|
MainAxisAlignment rowMainAxisAlignment =
|
||||||
ownMessage ? MainAxisAlignment.end : MainAxisAlignment.start;
|
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);
|
color = Theme.of(context).scaffoldBackgroundColor.withOpacity(0.66);
|
||||||
textColor = Theme.of(context).textTheme.bodyText2.color;
|
textColor = Theme.of(context).textTheme.bodyText2.color;
|
||||||
} else if (ownMessage) {
|
} else if (ownMessage) {
|
||||||
|
|
|
@ -19,9 +19,10 @@ extension LocalizedBody on Event {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool get showThumbnail =>
|
bool get showThumbnail =>
|
||||||
kIsWeb ||
|
[EventTypes.Message, EventTypes.Sticker].contains(type) &&
|
||||||
|
(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> &&
|
||||||
|
|
Loading…
Reference in a new issue