mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 12:51:42 +03:00
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:
commit
0f7cc0a458
@ -781,4 +781,4 @@ SPEC CHECKSUMS:
|
||||
|
||||
PODFILE CHECKSUM: 9c48318ea254e2c78005a7a0c2d8bfc14ddd783d
|
||||
|
||||
COCOAPODS: 1.10.1
|
||||
COCOAPODS: 1.11.2
|
||||
|
@ -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) {
|
||||
|
@ -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} />}
|
||||
|
Loading…
Reference in New Issue
Block a user