mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-02-02 16:14:21 +01:00
fix: Wait for sync before enter a room a user has got invited
This commit is contained in:
parent
51d9a56058
commit
a745d3ce68
@ -39,7 +39,16 @@ class ChatListItem extends StatelessWidget {
|
||||
if (!activeChat) {
|
||||
if (room.membership == Membership.invite &&
|
||||
(await showFutureLoadingDialog(
|
||||
context: context, future: () => room.join()))
|
||||
context: context,
|
||||
future: () async {
|
||||
final joinedFuture = room.client.onRoomUpdate.stream
|
||||
.where((u) =>
|
||||
u.id == room.id &&
|
||||
u.membership == Membership.join)
|
||||
.first;
|
||||
await room.join();
|
||||
await joinedFuture;
|
||||
}))
|
||||
.error !=
|
||||
null) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user