From 41ebb339b994baa5a4cc576e9b081d79cdc3bb9d Mon Sep 17 00:00:00 2001 From: Radek Czemerys Date: Tue, 18 Aug 2020 19:37:15 +0200 Subject: [PATCH] fix: prevent SNTextView from crashing on Android --- src/screens/Compose/Compose.tsx | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/screens/Compose/Compose.tsx b/src/screens/Compose/Compose.tsx index 24f9ac68..b35385d6 100644 --- a/src/screens/Compose/Compose.tsx +++ b/src/screens/Compose/Compose.tsx @@ -14,7 +14,7 @@ import React, { useRef, useState, } from 'react'; -import { Keyboard } from 'react-native'; +import { Keyboard, View } from 'react-native'; import Icon from 'react-native-vector-icons/Ionicons'; import SNTextView from 'sn-textview'; import { @@ -514,18 +514,21 @@ export const Compose = (): JSX.Element => { /> )} + {/* Empty wrapping view fixes native textview crashing */} {!shouldDisplayEditor && application?.platform === Platform.Ios && ( - + + + )} );