design: Highlight emoji only messages
This commit is contained in:
parent
c4ecaa6571
commit
189493e074
2 changed files with 14 additions and 9 deletions
|
|
@ -122,12 +122,17 @@ class Message extends StatelessWidget {
|
||||||
bottomRight:
|
bottomRight:
|
||||||
ownMessage && previousEventSameSender ? hardCorner : roundedCorner,
|
ownMessage && previousEventSameSender ? hardCorner : roundedCorner,
|
||||||
);
|
);
|
||||||
final noBubble = {
|
final noBubble = ({
|
||||||
MessageTypes.Video,
|
MessageTypes.Video,
|
||||||
MessageTypes.Image,
|
MessageTypes.Image,
|
||||||
MessageTypes.Sticker,
|
MessageTypes.Sticker,
|
||||||
}.contains(event.messageType) &&
|
}.contains(event.messageType) &&
|
||||||
!event.redacted;
|
!event.redacted) ||
|
||||||
|
(event.messageType == MessageTypes.Text &&
|
||||||
|
event.relationshipType == null &&
|
||||||
|
event.onlyEmotes &&
|
||||||
|
event.numberEmotes > 0 &&
|
||||||
|
event.numberEmotes <= 3);
|
||||||
final noPadding = {
|
final noPadding = {
|
||||||
MessageTypes.File,
|
MessageTypes.File,
|
||||||
MessageTypes.Audio,
|
MessageTypes.Audio,
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ class MessageContent extends StatelessWidget {
|
||||||
}
|
}
|
||||||
final bigEmotes = event.onlyEmotes &&
|
final bigEmotes = event.onlyEmotes &&
|
||||||
event.numberEmotes > 0 &&
|
event.numberEmotes > 0 &&
|
||||||
event.numberEmotes <= 10;
|
event.numberEmotes <= 3;
|
||||||
return Linkify(
|
return Linkify(
|
||||||
text: event.calcLocalizedBodyFallback(
|
text: event.calcLocalizedBodyFallback(
|
||||||
MatrixLocals(L10n.of(context)),
|
MatrixLocals(L10n.of(context)),
|
||||||
|
|
@ -259,13 +259,13 @@ class MessageContent extends StatelessWidget {
|
||||||
),
|
),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: textColor,
|
color: textColor,
|
||||||
fontSize: bigEmotes ? fontSize * 3 : fontSize,
|
fontSize: bigEmotes ? fontSize * 6 : fontSize,
|
||||||
decoration: event.redacted ? TextDecoration.lineThrough : null,
|
decoration: event.redacted ? TextDecoration.lineThrough : null,
|
||||||
),
|
),
|
||||||
options: const LinkifyOptions(humanize: false),
|
options: const LinkifyOptions(humanize: false),
|
||||||
linkStyle: TextStyle(
|
linkStyle: TextStyle(
|
||||||
color: textColor.withAlpha(150),
|
color: textColor.withAlpha(150),
|
||||||
fontSize: bigEmotes ? fontSize * 3 : fontSize,
|
fontSize: fontSize,
|
||||||
decoration: TextDecoration.underline,
|
decoration: TextDecoration.underline,
|
||||||
decorationColor: textColor.withAlpha(150),
|
decorationColor: textColor.withAlpha(150),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue