chore: allow users in un-started activities to leave (#4714)
This commit is contained in:
parent
196318d0e7
commit
4ee9dd7c49
2 changed files with 12 additions and 4 deletions
|
|
@ -116,13 +116,21 @@ class ActivitySessionStartController extends State<ActivitySessionStartPage>
|
|||
false;
|
||||
|
||||
SessionState get state {
|
||||
if (activityRoom?.hasPickedRole == true) return SessionState.confirmedRole;
|
||||
if (_selectedRoleId != null) return SessionState.selectedRole;
|
||||
if (activityRoom == null) {
|
||||
if (activityRoom?.membership == Membership.join &&
|
||||
activityRoom?.hasPickedRole == true) {
|
||||
return SessionState.confirmedRole;
|
||||
}
|
||||
|
||||
if (_selectedRoleId != null) {
|
||||
return SessionState.selectedRole;
|
||||
}
|
||||
|
||||
if (activityRoom == null || activityRoom!.membership != Membership.join) {
|
||||
return widget.roomId != null || widget.launch
|
||||
? SessionState.notSelectedRole
|
||||
: SessionState.notStarted;
|
||||
}
|
||||
|
||||
return SessionState.notSelectedRole;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ void chatContextMenuAction(
|
|||
],
|
||||
),
|
||||
),
|
||||
if (!room.isActivitySession || room.ownRole == null)
|
||||
if (!room.isActivitySession || !room.isActivityStarted)
|
||||
PopupMenuItem(
|
||||
value: ChatContextAction.leave,
|
||||
child: Row(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue