diff --git a/lib/components/list_items/chat_list_item.dart b/lib/components/list_items/chat_list_item.dart index 1396e51..e63777a 100644 --- a/lib/components/list_items/chat_list_item.dart +++ b/lib/components/list_items/chat_list_item.dart @@ -5,6 +5,7 @@ import 'package:fluffychat/utils/date_time_extension.dart'; import 'package:fluffychat/utils/app_route.dart'; import 'package:fluffychat/utils/room_extension.dart'; import 'package:fluffychat/views/chat.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:toast/toast.dart'; import 'package:pedantic/pedantic.dart'; @@ -99,6 +100,14 @@ class ChatListItem extends StatelessWidget { ), ), SizedBox(width: 16), + room.pushRuleState == PushRuleState.notify + ? Container() + : Icon( + Icons.notifications_off, + color: Colors.grey[400], + size: 16, + ), + SizedBox(width: 4), Text( room.timeCreated.localizedTimeShort(context), style: TextStyle( @@ -132,13 +141,6 @@ class ChatListItem extends StatelessWidget { ), ), SizedBox(width: 8), - room.pushRuleState == PushRuleState.notify - ? Container() - : Icon( - Icons.notifications_off, - color: Colors.grey, - size: 16, - ), room.notificationCount > 0 ? Container( padding: EdgeInsets.symmetric(horizontal: 5), diff --git a/lib/components/list_items/message.dart b/lib/components/list_items/message.dart index 6e0e424..82acc02 100644 --- a/lib/components/list_items/message.dart +++ b/lib/components/list_items/message.dart @@ -29,7 +29,7 @@ class Message extends StatelessWidget { Client client = Matrix.of(context).client; final bool ownMessage = event.senderId == client.userID; Alignment alignment = ownMessage ? Alignment.topRight : Alignment.topLeft; - Color color = Theme.of(context).secondaryHeaderColor; + Color color = Colors.white; final bool sameSender = nextEvent != null && [EventTypes.Message, EventTypes.Sticker].contains(nextEvent.type) ? nextEvent.sender.id == event.sender.id @@ -135,7 +135,7 @@ class Message extends StatelessWidget { duration: Duration(milliseconds: 500), opacity: event.status == 0 ? 0.5 : 1, child: Bubble( - elevation: 0, + //elevation: 0, alignment: alignment, margin: BubbleEdges.symmetric(horizontal: 4), color: color, diff --git a/lib/components/list_items/state_message.dart b/lib/components/list_items/state_message.dart index e0db5e0..0f751c6 100644 --- a/lib/components/list_items/state_message.dart +++ b/lib/components/list_items/state_message.dart @@ -21,7 +21,6 @@ class StateMessage extends StatelessWidget { opacity: 0.5, child: Bubble( color: Colors.black, - elevation: 0, alignment: Alignment.center, child: LinkText( text: event.getLocalizedBody(context), diff --git a/lib/main.dart b/lib/main.dart index 665137b..6d24ac7 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -29,7 +29,7 @@ class App extends StatelessWidget { brightness: Brightness.light, primaryColor: Color(0xFF5625BA), backgroundColor: Colors.white, - secondaryHeaderColor: Color(0xFFE8E4EA), + secondaryHeaderColor: Color(0xFFF6F0F6), scaffoldBackgroundColor: Colors.white, dialogTheme: DialogTheme( shape: RoundedRectangleBorder( diff --git a/lib/utils/event_extension.dart b/lib/utils/event_extension.dart index f1eeb11..4c0872d 100644 --- a/lib/utils/event_extension.dart +++ b/lib/utils/event_extension.dart @@ -208,7 +208,10 @@ extension LocalizedBody on Event { if (withSenderNamePrefix && this.type == EventTypes.Message && textOnlyMessageTypes.contains(this.messageType)) { - localizedBody = "$senderName: $localizedBody"; + final String senderNameOrYou = this.senderId == room.client.userID + ? I18n.of(context).you + : senderName; + localizedBody = "$senderNameOrYou: $localizedBody"; } // Hide quotes diff --git a/lib/views/chat.dart b/lib/views/chat.dart index 159cb2d..a941d68 100644 --- a/lib/views/chat.dart +++ b/lib/views/chat.dart @@ -253,6 +253,7 @@ class _ChatState extends State<_Chat> { ), actions: [ChatSettingsPopupMenu(room, !room.isDirectChat)], ), + backgroundColor: Theme.of(context).secondaryHeaderColor, body: SafeArea( child: Column( children: [