[FIX] Create a discussion from NewMessageView (#4003)
* [FIX] Create a discussion from NewMessageView * fix the itemData.value to any * minor tweak
This commit is contained in:
parent
ec952b058a
commit
8268beeb67
|
@ -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}`}
|
||||
|
|
|
@ -26,7 +26,7 @@ import Input from './Input';
|
|||
import styles from './styles';
|
||||
|
||||
export interface IItemData {
|
||||
value: string;
|
||||
value: any;
|
||||
text: { text: string };
|
||||
imageUrl?: string;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}))}
|
||||
|
|
|
@ -137,8 +137,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];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue