Merge pull request #2207 from ecency/sa/inline-video-player-crash-bug

Fixes App Crash in Long Posts when scroll to end
This commit is contained in:
Feruz M 2022-02-28 16:51:07 +02:00 committed by GitHub
commit 0f7cc0a458
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 7 deletions

View File

@ -781,4 +781,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 9c48318ea254e2c78005a7a0c2d8bfc14ddd783d
COCOAPODS: 1.10.1
COCOAPODS: 1.11.2

View File

@ -138,9 +138,7 @@ export const PostHtmlRenderer = memo(
//process video link
if(tnode.classes?.indexOf('markdown-video-link') >= 0){
//TODO: remove android check when fix for react-native-weview scroll crash is available
//ref: https://github.com/react-native-webview/react-native-webview/issues/2364
if(isComment || Platform.OS === 'android'){
if(isComment){
const imgElement = tnode.children.find((child) => {
return child.classes.indexOf('video-thumbnail') > 0 ? true : false;
});
@ -227,9 +225,7 @@ export const PostHtmlRenderer = memo(
const _iframeRenderer = function IframeRenderer(props) {
const iframeProps = useHtmlIframeProps(props);
//TODO: remove android check logic when fix for react-native-webiew scrollview crash is available
//ref: https://github.com/react-native-webview/react-native-webview/issues/2364
if(isComment || Platform.OS === 'android'){
if(isComment){
const _onPress = () => {
console.log('iframe thumb Pressed:', iframeProps);
if (handleVideoPress) {

View File

@ -206,6 +206,7 @@ const PostDisplayView = ({
contentContainerStyle={styles.scrollContent}
onScroll={(event) => _handleOnScroll(event)}
scrollEventThrottle={16}
overScrollMode="never"
refreshControl={<RefreshControl refreshing={refreshing} onRefresh={onRefresh} />}
>
{parentPost && <ParentPost post={parentPost} />}