Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/containers/UIKit/MultiSelect/Items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const keyExtractor = (item: IItemData) => item.value.toString();

// RectButton doesn't work on modal (Android)
const Item = ({ item, selected, onSelect, theme }: IItem) => {
const itemName = item.value || item.text.text.toLowerCase();
const itemName = item.value?.name || item.text.text.toLowerCase();
return (
<Touchable
testID={`multi-select-item-${itemName}`}
Expand Down
2 changes: 1 addition & 1 deletion app/containers/UIKit/MultiSelect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import Input from './Input';
import styles from './styles';

export interface IItemData {
value: string;
value: any;
Comment thread
AlexAlexandre marked this conversation as resolved.
Comment thread
AlexAlexandre marked this conversation as resolved.
text: { text: string };
imageUrl?: string;
}
Expand Down
2 changes: 1 addition & 1 deletion app/views/CreateDiscussionView/SelectChannel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const SelectChannel = ({
value={initial && [initial]}
disabled={!!initial}
options={channels.map(channel => ({
value: channel.name || channel.fname,
value: channel,
text: { text: RocketChat.getRoomTitle(channel) },
imageUrl: getAvatar(channel)
}))}
Expand Down
2 changes: 0 additions & 2 deletions app/views/CreateDiscussionView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ class CreateChannelView extends React.Component<ICreateChannelViewProps, any> {
get isEncryptionEnabled() {
const { channel } = this.state;
const { encryptionEnabled } = this.props;
// TODO: remove this ts-ignore when migrate the file: app/lib/encryption/constants.js
// @ts-ignore
return encryptionEnabled && E2E_ROOM_TYPES[channel?.t];
}

Expand Down