refactor: Use non nullable localizations builder and lazy load on web

This commit is contained in:
krille-chan 2024-10-06 08:35:37 +02:00
commit 0d4b7d67cc
No known key found for this signature in database
111 changed files with 879 additions and 883 deletions

View file

@ -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: [