mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-25 23:12:37 +01:00
minor design tweaks
This commit is contained in:
parent
e497de5934
commit
e0893d3bfc
@ -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),
|
||||
|
@ -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,
|
||||
|
@ -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),
|
||||
|
@ -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(
|
||||
|
@ -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
|
||||
|
@ -253,6 +253,7 @@ class _ChatState extends State<_Chat> {
|
||||
),
|
||||
actions: <Widget>[ChatSettingsPopupMenu(room, !room.isDirectChat)],
|
||||
),
|
||||
backgroundColor: Theme.of(context).secondaryHeaderColor,
|
||||
body: SafeArea(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
|
Loading…
Reference in New Issue
Block a user