feat: use the stripped body for notifications and room previews
This commit is contained in:
parent
aca4a86f00
commit
06235cddd0
2 changed files with 2 additions and 11 deletions
|
|
@ -595,12 +595,7 @@ class BackgroundPush {
|
||||||
final title = l10n.unreadMessages(room.notificationCount);
|
final title = l10n.unreadMessages(room.notificationCount);
|
||||||
|
|
||||||
// Calculate the body
|
// Calculate the body
|
||||||
final body = event?.getLocalizedBody(
|
final body = event?.plaintextBody ?? l10n.openAppToReadMessages;
|
||||||
MatrixLocals(l10n),
|
|
||||||
withSenderNamePrefix: true,
|
|
||||||
hideReply: true,
|
|
||||||
) ??
|
|
||||||
l10n.openAppToReadMessages;
|
|
||||||
|
|
||||||
// The person object for the android message style notification
|
// The person object for the android message style notification
|
||||||
final avatar = room.avatar == null
|
final avatar = room.avatar == null
|
||||||
|
|
|
||||||
|
|
@ -268,11 +268,7 @@ class ChatListItem extends StatelessWidget {
|
||||||
: Text(
|
: Text(
|
||||||
room.membership == Membership.invite
|
room.membership == Membership.invite
|
||||||
? L10n.of(context).youAreInvitedToThisChat
|
? L10n.of(context).youAreInvitedToThisChat
|
||||||
: room.lastEvent?.getLocalizedBody(
|
: room.lastEvent?.plaintextBody,
|
||||||
MatrixLocals(L10n.of(context)),
|
|
||||||
hideReply: true,
|
|
||||||
) ??
|
|
||||||
'',
|
|
||||||
softWrap: false,
|
softWrap: false,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue