mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-26 08:02:34 +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/app_route.dart';
|
||||||
import 'package:fluffychat/utils/room_extension.dart';
|
import 'package:fluffychat/utils/room_extension.dart';
|
||||||
import 'package:fluffychat/views/chat.dart';
|
import 'package:fluffychat/views/chat.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:toast/toast.dart';
|
import 'package:toast/toast.dart';
|
||||||
import 'package:pedantic/pedantic.dart';
|
import 'package:pedantic/pedantic.dart';
|
||||||
@ -99,6 +100,14 @@ class ChatListItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 16),
|
SizedBox(width: 16),
|
||||||
|
room.pushRuleState == PushRuleState.notify
|
||||||
|
? Container()
|
||||||
|
: Icon(
|
||||||
|
Icons.notifications_off,
|
||||||
|
color: Colors.grey[400],
|
||||||
|
size: 16,
|
||||||
|
),
|
||||||
|
SizedBox(width: 4),
|
||||||
Text(
|
Text(
|
||||||
room.timeCreated.localizedTimeShort(context),
|
room.timeCreated.localizedTimeShort(context),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -132,13 +141,6 @@ class ChatListItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
room.pushRuleState == PushRuleState.notify
|
|
||||||
? Container()
|
|
||||||
: Icon(
|
|
||||||
Icons.notifications_off,
|
|
||||||
color: Colors.grey,
|
|
||||||
size: 16,
|
|
||||||
),
|
|
||||||
room.notificationCount > 0
|
room.notificationCount > 0
|
||||||
? Container(
|
? Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5),
|
padding: EdgeInsets.symmetric(horizontal: 5),
|
||||||
|
@ -29,7 +29,7 @@ class Message extends StatelessWidget {
|
|||||||
Client client = Matrix.of(context).client;
|
Client client = Matrix.of(context).client;
|
||||||
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 = Colors.white;
|
||||||
final bool sameSender = nextEvent != null &&
|
final bool sameSender = nextEvent != null &&
|
||||||
[EventTypes.Message, EventTypes.Sticker].contains(nextEvent.type)
|
[EventTypes.Message, EventTypes.Sticker].contains(nextEvent.type)
|
||||||
? nextEvent.sender.id == event.sender.id
|
? nextEvent.sender.id == event.sender.id
|
||||||
@ -135,7 +135,7 @@ class Message extends StatelessWidget {
|
|||||||
duration: Duration(milliseconds: 500),
|
duration: Duration(milliseconds: 500),
|
||||||
opacity: event.status == 0 ? 0.5 : 1,
|
opacity: event.status == 0 ? 0.5 : 1,
|
||||||
child: Bubble(
|
child: Bubble(
|
||||||
elevation: 0,
|
//elevation: 0,
|
||||||
alignment: alignment,
|
alignment: alignment,
|
||||||
margin: BubbleEdges.symmetric(horizontal: 4),
|
margin: BubbleEdges.symmetric(horizontal: 4),
|
||||||
color: color,
|
color: color,
|
||||||
|
@ -21,7 +21,6 @@ class StateMessage extends StatelessWidget {
|
|||||||
opacity: 0.5,
|
opacity: 0.5,
|
||||||
child: Bubble(
|
child: Bubble(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
elevation: 0,
|
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: LinkText(
|
child: LinkText(
|
||||||
text: event.getLocalizedBody(context),
|
text: event.getLocalizedBody(context),
|
||||||
|
@ -29,7 +29,7 @@ class App extends StatelessWidget {
|
|||||||
brightness: Brightness.light,
|
brightness: Brightness.light,
|
||||||
primaryColor: Color(0xFF5625BA),
|
primaryColor: Color(0xFF5625BA),
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
secondaryHeaderColor: Color(0xFFE8E4EA),
|
secondaryHeaderColor: Color(0xFFF6F0F6),
|
||||||
scaffoldBackgroundColor: Colors.white,
|
scaffoldBackgroundColor: Colors.white,
|
||||||
dialogTheme: DialogTheme(
|
dialogTheme: DialogTheme(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
@ -208,7 +208,10 @@ extension LocalizedBody on Event {
|
|||||||
if (withSenderNamePrefix &&
|
if (withSenderNamePrefix &&
|
||||||
this.type == EventTypes.Message &&
|
this.type == EventTypes.Message &&
|
||||||
textOnlyMessageTypes.contains(this.messageType)) {
|
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
|
// Hide quotes
|
||||||
|
@ -253,6 +253,7 @@ class _ChatState extends State<_Chat> {
|
|||||||
),
|
),
|
||||||
actions: <Widget>[ChatSettingsPopupMenu(room, !room.isDirectChat)],
|
actions: <Widget>[ChatSettingsPopupMenu(room, !room.isDirectChat)],
|
||||||
),
|
),
|
||||||
|
backgroundColor: Theme.of(context).secondaryHeaderColor,
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
|
Loading…
Reference in New Issue
Block a user