refactor: Switch to Hive Collections DB
This commit is contained in:
parent
db8c8dda22
commit
c249ebb97c
29 changed files with 347 additions and 216 deletions
|
|
@ -31,7 +31,7 @@ extension LocalNotificationsExtension on MatrixState {
|
|||
final event = Event.fromJson(eventUpdate.content, room);
|
||||
final title =
|
||||
room.getLocalizedDisplayname(MatrixLocals(L10n.of(widget.context)!));
|
||||
final body = event.getLocalizedBody(
|
||||
final body = await event.calcLocalizedBody(
|
||||
MatrixLocals(L10n.of(widget.context)!),
|
||||
withSenderNamePrefix:
|
||||
!room.isDirectChat || room.lastEvent?.senderId == client.userID,
|
||||
|
|
@ -40,8 +40,11 @@ extension LocalNotificationsExtension on MatrixState {
|
|||
hideEdit: true,
|
||||
removeMarkdown: true,
|
||||
);
|
||||
final icon = event.sender.avatarUrl?.getThumbnail(client,
|
||||
width: 64, height: 64, method: ThumbnailMethod.crop) ??
|
||||
final icon = event.senderFromMemoryOrFallback.avatarUrl?.getThumbnail(
|
||||
client,
|
||||
width: 64,
|
||||
height: 64,
|
||||
method: ThumbnailMethod.crop) ??
|
||||
room.avatar?.getThumbnail(client,
|
||||
width: 64, height: 64, method: ThumbnailMethod.crop);
|
||||
if (kIsWeb) {
|
||||
|
|
|
|||
|
|
@ -41,9 +41,7 @@ class PublicRoomBottomSheet extends StatelessWidget {
|
|||
}
|
||||
}
|
||||
|
||||
bool _testRoom(PublicRoomsChunk r) =>
|
||||
r.canonicalAlias == roomAlias ||
|
||||
(r.aliases?.contains(roomAlias) ?? false);
|
||||
bool _testRoom(PublicRoomsChunk r) => r.canonicalAlias == roomAlias;
|
||||
|
||||
Future<PublicRoomsChunk> _search(BuildContext context) async {
|
||||
final chunk = this.chunk;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue