fix: on join activity with role, preload activity participants list to get accurate list of assigned roles (#4326)
This commit is contained in:
parent
2ab664ecea
commit
df4410e85d
2 changed files with 9 additions and 1 deletions
|
|
@ -53,7 +53,6 @@ class _ActivityStatsButtonState extends State<ActivityStatsButton> {
|
|||
u.state.type == PangeaEventTypes.activityRole,
|
||||
)
|
||||
.listen((_) {
|
||||
debugPrint("ON ROOM STATE");
|
||||
_showStatsMenuDropdownInstructions();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -311,6 +311,15 @@ class ActivitySessionStartController extends State<ActivitySessionStartPage>
|
|||
}
|
||||
|
||||
try {
|
||||
// Since the method that check for assigned roles needs to know each
|
||||
// participant's membership status (to exclude left users), we need
|
||||
// to pre-load the room's participants list.
|
||||
activityRoom!.requestParticipants(
|
||||
[Membership.join, Membership.invite, Membership.knock],
|
||||
false,
|
||||
true,
|
||||
);
|
||||
|
||||
await activityRoom!.joinActivity(
|
||||
activity!.roles[_selectedRoleId!]!,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue