chore: Update SDK

This commit is contained in:
Christian Pauly 2021-09-10 10:44:24 +02:00
commit 65747aecbf
5 changed files with 13 additions and 14 deletions

View file

@ -48,11 +48,8 @@ class SearchController extends State<Search> {
final newRoomId = await Matrix.of(context)
.client
.joinRoom(alias?.isNotEmpty ?? false ? alias : roomId);
await Matrix.of(context)
.client
.onRoomUpdate
.stream
.firstWhere((r) => r.id == newRoomId);
await Matrix.of(context).client.onSync.stream.firstWhere(
(update) => update.rooms?.join?.containsKey(newRoomId) ?? false);
return newRoomId;
}

View file

@ -41,10 +41,9 @@ class ChatListItem extends StatelessWidget {
(await showFutureLoadingDialog(
context: context,
future: () async {
final joinedFuture = room.client.onRoomUpdate.stream
final joinedFuture = room.client.onSync.stream
.where((u) =>
u.id == room.id &&
u.membership == Membership.join)
u.rooms?.join?.containsKey(room.id) ?? false)
.first;
await room.join();
await joinedFuture;

View file

@ -28,9 +28,9 @@ class PublicRoomListItem extends StatelessWidget {
if (Matrix.of(context).client.getRoomById(roomId) == null) {
await Matrix.of(context)
.client
.onRoomUpdate
.onSync
.stream
.firstWhere((r) => r.id == roomId);
.firstWhere((u) => u.rooms?.join?.containsKey(roomId) ?? false);
}
return roomId;
}