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

@ -12,24 +12,24 @@ extension RoomStatusExtension on Room {
typingUsers.removeWhere((User u) => u.id == client.userID);
if (AppConfig.hideTypingUsernames) {
typingText = L10n.of(context)!.isTyping;
typingText = L10n.of(context).isTyping;
if (typingUsers.first.id != directChatMatrixID) {
typingText =
L10n.of(context)!.numUsersTyping(typingUsers.length.toString());
L10n.of(context).numUsersTyping(typingUsers.length.toString());
}
} else if (typingUsers.length == 1) {
typingText = L10n.of(context)!.isTyping;
typingText = L10n.of(context).isTyping;
if (typingUsers.first.id != directChatMatrixID) {
typingText =
L10n.of(context)!.userIsTyping(typingUsers.first.calcDisplayname());
L10n.of(context).userIsTyping(typingUsers.first.calcDisplayname());
}
} else if (typingUsers.length == 2) {
typingText = L10n.of(context)!.userAndUserAreTyping(
typingText = L10n.of(context).userAndUserAreTyping(
typingUsers.first.calcDisplayname(),
typingUsers[1].calcDisplayname(),
);
} else if (typingUsers.length > 2) {
typingText = L10n.of(context)!.userAndOthersAreTyping(
typingText = L10n.of(context).userAndOthersAreTyping(
typingUsers.first.calcDisplayname(),
(typingUsers.length - 1).toString(),
);