refactor: Use non nullable localizations builder and lazy load on web
This commit is contained in:
parent
8cedd2a45a
commit
0d4b7d67cc
111 changed files with 879 additions and 883 deletions
|
|
@ -37,9 +37,9 @@ extension LocalNotificationsExtension on MatrixState {
|
|||
if (room.notificationCount == 0) return;
|
||||
|
||||
final event = Event.fromJson(eventUpdate.content, room);
|
||||
final title = room.getLocalizedDisplayname(MatrixLocals(L10n.of(context)!));
|
||||
final title = room.getLocalizedDisplayname(MatrixLocals(L10n.of(context)));
|
||||
final body = await event.calcLocalizedBody(
|
||||
MatrixLocals(L10n.of(context)!),
|
||||
MatrixLocals(L10n.of(context)),
|
||||
withSenderNamePrefix:
|
||||
!room.isDirectChat || room.lastEvent?.senderId == client.userID,
|
||||
plaintextBody: true,
|
||||
|
|
@ -91,11 +91,11 @@ extension LocalNotificationsExtension on MatrixState {
|
|||
actions: [
|
||||
NotificationAction(
|
||||
DesktopNotificationActions.openChat.name,
|
||||
L10n.of(context)!.openChat,
|
||||
L10n.of(context).openChat,
|
||||
),
|
||||
NotificationAction(
|
||||
DesktopNotificationActions.seen.name,
|
||||
L10n.of(context)!.markAsRead,
|
||||
L10n.of(context).markAsRead,
|
||||
),
|
||||
],
|
||||
hints: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue