[FIX] Create discussion not working from MessageActions (#2265)

This commit is contained in:
Djorkaeff Alexandre 2020-07-08 17:57:05 -03:00 committed by GitHub
parent 5782a3363b
commit aef7125887
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -117,7 +117,12 @@ const MessageActions = React.memo(forwardRef(({
const handleEdit = message => editInit(message);
const handleCreateDiscussion = (message) => {
Navigation.navigate('CreateDiscussionView', { message, channel: room });
const params = { message, channel: room, showCloseModal: true };
if (isMasterDetail) {
Navigation.navigate('ModalStackNavigator', { screen: 'CreateDiscussionView', params });
} else {
Navigation.navigate('NewMessageStackNavigator', { screen: 'CreateDiscussionView', params });
}
};
const handleUnread = async(message) => {