[FIX] Remove all invited users when create a channel (#1814)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
6ada35e460
commit
524e163091
|
@ -44,8 +44,10 @@ const UserItem = ({
|
||||||
}) => {
|
}) => {
|
||||||
const longPress = ({ nativeEvent }) => {
|
const longPress = ({ nativeEvent }) => {
|
||||||
if (nativeEvent.state === State.ACTIVE) {
|
if (nativeEvent.state === State.ACTIVE) {
|
||||||
|
if (onLongPress) {
|
||||||
onLongPress();
|
onLongPress();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -208,10 +208,7 @@ class CreateChannelView extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
removeUser = (user) => {
|
removeUser = (user) => {
|
||||||
const { users, removeUser } = this.props;
|
const { removeUser } = this.props;
|
||||||
if (users.length === 1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
removeUser(user);
|
removeUser(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,6 +282,7 @@ class CreateChannelView extends React.Component {
|
||||||
username={item.name}
|
username={item.name}
|
||||||
onPress={() => this.removeUser(item)}
|
onPress={() => this.removeUser(item)}
|
||||||
testID={`create-channel-view-item-${ item.name }`}
|
testID={`create-channel-view-item-${ item.name }`}
|
||||||
|
icon='check'
|
||||||
baseUrl={baseUrl}
|
baseUrl={baseUrl}
|
||||||
user={user}
|
user={user}
|
||||||
theme={theme}
|
theme={theme}
|
||||||
|
|
Loading…
Reference in New Issue