mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-06 20:19:30 +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 (!activeChat) {
|
||||||
if (room.membership == Membership.invite &&
|
if (room.membership == Membership.invite &&
|
||||||
(await showFutureLoadingDialog(
|
(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 !=
|
.error !=
|
||||||
null) {
|
null) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user