Clean up
This commit is contained in:
parent
f34366060c
commit
f066c523a0
12 changed files with 123 additions and 119 deletions
|
|
@ -153,7 +153,7 @@ class ChatListItem extends StatelessWidget {
|
|||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
room.getLocalizedDisplayname(context),
|
||||
room.getLocalizedDisplayname(I18n.of(context)),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
|
|
@ -189,7 +189,7 @@ class ChatListItem extends StatelessWidget {
|
|||
),
|
||||
)
|
||||
: Text(
|
||||
room.lastEvent.getLocalizedBody(context,
|
||||
room.lastEvent.getLocalizedBody(I18n.of(context),
|
||||
withSenderNamePrefix: true, hideReply: true),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:bubble/bubble.dart';
|
||||
import 'package:famedlysdk/famedlysdk.dart';
|
||||
import 'package:fluffychat/i18n/i18n.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:fluffychat/utils/event_extension.dart';
|
||||
|
||||
|
|
@ -21,7 +22,7 @@ class StateMessage extends StatelessWidget {
|
|||
color: Theme.of(context).backgroundColor.withOpacity(0.66),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
event.getLocalizedBody(context),
|
||||
event.getLocalizedBody(I18n.of(context)),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).textTheme.body1.color,
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class MessageContent extends StatelessWidget {
|
|||
);
|
||||
}
|
||||
return LinkText(
|
||||
text: event.getLocalizedBody(context, hideReply: true),
|
||||
text: event.getLocalizedBody(I18n.of(context), hideReply: true),
|
||||
textStyle: TextStyle(
|
||||
color: textColor,
|
||||
decoration: event.redacted ? TextDecoration.lineThrough : null,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:famedlysdk/famedlysdk.dart';
|
||||
import 'package:fluffychat/i18n/i18n.dart';
|
||||
import 'package:fluffychat/utils/event_extension.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
|
@ -35,8 +36,11 @@ class ReplyContent extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
Text(
|
||||
replyEvent?.getLocalizedBody(context,
|
||||
withSenderNamePrefix: false, hideReply: true) ??
|
||||
replyEvent?.getLocalizedBody(
|
||||
I18n.of(context),
|
||||
withSenderNamePrefix: false,
|
||||
hideReply: true,
|
||||
) ??
|
||||
"",
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue