fix: Load space members to display DM rooms
This commit is contained in:
parent
29a3b4ff02
commit
c13e17afeb
1 changed files with 10 additions and 0 deletions
|
|
@ -326,6 +326,16 @@ class ChatListController extends State<ChatList> {
|
||||||
if (client.prevBatch?.isEmpty ?? true) {
|
if (client.prevBatch?.isEmpty ?? true) {
|
||||||
await client.onFirstSync.stream.first;
|
await client.onFirstSync.stream.first;
|
||||||
}
|
}
|
||||||
|
// Load space members to display DM rooms
|
||||||
|
if (activeSpaceId != null) {
|
||||||
|
final space = client.getRoomById(activeSpaceId);
|
||||||
|
final localMembers = space.getParticipants().length;
|
||||||
|
final actualMembersCount = (space.summary?.mInvitedMemberCount ?? 0) +
|
||||||
|
(space.summary?.mJoinedMemberCount ?? 0);
|
||||||
|
if (localMembers < actualMembersCount) {
|
||||||
|
await space.requestParticipants();
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue