Minor fixes

This commit is contained in:
Christian Pauly 2020-03-13 21:42:05 +01:00
parent 3b574b047f
commit 01b1b56852
4 changed files with 13 additions and 8 deletions

View file

@ -11,9 +11,15 @@ class Avatar extends StatelessWidget {
final String name;
final double size;
final Function onTap;
static const double defaultSize = 44;
const Avatar(this.mxContent, this.name, {this.size = 40, this.onTap, Key key})
: super(key: key);
const Avatar(
this.mxContent,
this.name, {
this.size = defaultSize,
this.onTap,
Key key,
}) : super(key: key);
@override
Widget build(BuildContext context) {

View file

@ -140,7 +140,7 @@ class Message extends StatelessWidget {
),
];
final Widget avatarOrSizedBox = sameSender
? SizedBox(width: 40)
? SizedBox(width: Avatar.defaultSize)
: Avatar(
event.sender.avatarUrl,
event.sender.calcDisplayname(),

View file

@ -2,7 +2,6 @@ import 'package:bubble/bubble.dart';
import 'package:famedlysdk/famedlysdk.dart';
import 'package:flutter/material.dart';
import 'package:fluffychat/utils/event_extension.dart';
import 'package:link_text/link_text.dart';
class StateMessage extends StatelessWidget {
final Event event;
@ -21,10 +20,10 @@ class StateMessage extends StatelessWidget {
elevation: 0,
color: Theme.of(context).backgroundColor.withOpacity(0.5),
alignment: Alignment.center,
child: LinkText(
text: event.getLocalizedBody(context),
child: Text(
event.getLocalizedBody(context),
textAlign: TextAlign.center,
textStyle: TextStyle(
style: TextStyle(
color: Theme.of(context).primaryColor,
decoration: event.redacted ? TextDecoration.lineThrough : null,
),

View file

@ -1048,7 +1048,7 @@
"type": "text",
"placeholders": {}
},
"Tuesday": "Tuesday",
"Tuesday": "Dienstag",
"@Tuesday": {
"type": "text",
"placeholders": {}