mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-03 01:39:31 +01:00
Fix #55
This commit is contained in:
parent
d4af4ad76e
commit
3c2cf1f6e5
@ -41,8 +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 &&
|
final bool isImage = [EventTypes.Message, EventTypes.Sticker].contains(nextEvent.type);
|
||||||
[EventTypes.Message, EventTypes.Sticker].contains(nextEvent.type)
|
final bool sameSender = nextEvent != null && isImage
|
||||||
? nextEvent.sender.id == event.sender.id
|
? nextEvent.sender.id == event.sender.id
|
||||||
: false;
|
: false;
|
||||||
BubbleNip nip = sameSender
|
BubbleNip nip = sameSender
|
||||||
@ -56,7 +56,7 @@ class Message extends StatelessWidget {
|
|||||||
MainAxisAlignment rowMainAxisAlignment =
|
MainAxisAlignment rowMainAxisAlignment =
|
||||||
ownMessage ? MainAxisAlignment.end : MainAxisAlignment.start;
|
ownMessage ? MainAxisAlignment.end : MainAxisAlignment.start;
|
||||||
|
|
||||||
if (event.showThumbnail) {
|
if (isImage && 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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user