Fix: Breakouts calculation for valid users incorrect
This commit is contained in:
parent
9539ad09c0
commit
a86bdc9f1e
@ -469,7 +469,7 @@ class BreakoutRoom extends PureComponent {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (users.length === this.getUserByRoom(0).length && !freeJoin) {
|
if (users.length === this.getUserByRoom(0).length) {
|
||||||
this.setState({ leastOneUserIsValid: false });
|
this.setState({ leastOneUserIsValid: false });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -510,9 +510,9 @@ class BreakoutRoom extends PureComponent {
|
|||||||
|
|
||||||
onInviteBreakout() {
|
onInviteBreakout() {
|
||||||
const { getBreakouts, sendInvitation } = this.props;
|
const { getBreakouts, sendInvitation } = this.props;
|
||||||
const { users, freeJoin } = this.state;
|
const { users } = this.state;
|
||||||
const breakouts = getBreakouts();
|
const breakouts = getBreakouts();
|
||||||
if (users.length === this.getUserByRoom(0).length && !freeJoin) {
|
if (users.length === this.getUserByRoom(0).length) {
|
||||||
this.setState({ leastOneUserIsValid: false });
|
this.setState({ leastOneUserIsValid: false });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -637,7 +637,7 @@ class BreakoutRoom extends PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setFreeJoin(e) {
|
setFreeJoin(e) {
|
||||||
this.setState({ freeJoin: e.target.checked, leastOneUserIsValid: true });
|
this.setState({ freeJoin: e.target.checked });
|
||||||
}
|
}
|
||||||
|
|
||||||
setRecord(e) {
|
setRecord(e) {
|
||||||
@ -724,7 +724,7 @@ class BreakoutRoom extends PureComponent {
|
|||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
users: usersCopy,
|
users: usersCopy,
|
||||||
leastOneUserIsValid: (this.getUserByRoom(0).length !== users.length || freeJoin),
|
leastOneUserIsValid: (this.getUserByRoom(0).length !== users.length),
|
||||||
}, () => {
|
}, () => {
|
||||||
addNewAlert(intl.formatMessage(intlMessages.movedUserLabel, { 0: userName, 1: room }))
|
addNewAlert(intl.formatMessage(intlMessages.movedUserLabel, { 0: userName, 1: room }))
|
||||||
});
|
});
|
||||||
@ -1149,6 +1149,8 @@ class BreakoutRoom extends PureComponent {
|
|||||||
leastOneUserIsValid,
|
leastOneUserIsValid,
|
||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
|
console.log('leastOneUserIsValid', leastOneUserIsValid);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Styled.AssignBtnsContainer>
|
<Styled.AssignBtnsContainer>
|
||||||
<Styled.LabelText bold aria-hidden>
|
<Styled.LabelText bold aria-hidden>
|
||||||
|
Loading…
Reference in New Issue
Block a user