[FIX] Remove all invited users when create a channel (#1814)

Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
Prateek Jain 2020-03-04 02:55:23 +05:30 committed by GitHub
parent 6ada35e460
commit 524e163091
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -44,8 +44,10 @@ const UserItem = ({
}) => {
const longPress = ({ nativeEvent }) => {
if (nativeEvent.state === State.ACTIVE) {
if (onLongPress) {
onLongPress();
}
}
};
return (

View File

@ -208,10 +208,7 @@ class CreateChannelView extends React.Component {
}
removeUser = (user) => {
const { users, removeUser } = this.props;
if (users.length === 1) {
return;
}
const { removeUser } = this.props;
removeUser(user);
}
@ -285,6 +282,7 @@ class CreateChannelView extends React.Component {
username={item.name}
onPress={() => this.removeUser(item)}
testID={`create-channel-view-item-${ item.name }`}
icon='check'
baseUrl={baseUrl}
user={user}
theme={theme}