Unverified Commit 524e1630 authored by Prateek Jain's avatar Prateek Jain Committed by GitHub
Browse files

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


Co-authored-by: default avatarDiego Mello <diegolmello@gmail.com>
parent 6ada35e4
......@@ -44,7 +44,9 @@ const UserItem = ({
}) => {
const longPress = ({ nativeEvent }) => {
if (nativeEvent.state === State.ACTIVE) {
onLongPress();
if (onLongPress) {
onLongPress();
}
}
};
......
......@@ -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}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment