Improved anchored image response

This commit is contained in:
noumantahir 2022-01-12 12:41:14 +05:00
parent 5bb58eb42f
commit b81c88d140
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ import { TouchableWithoutFeedback } from "react-native-gesture-handler";
}
return (
<TouchableWithoutFeedback onPress={onPress} disabled={!isAnchored}>
<TouchableWithoutFeedback onPress={onPress} disabled={isAnchored}>
<FastImage
style={imgStyle}
source={{uri:imgUrl}}

View File

@ -168,7 +168,7 @@ export const PostHtmlRenderer = memo(({
};
const isVideoThumb = tnode.classes?.indexOf('video-thumbnail') >= 0;
const isAnchored = !(tnode.parent?.classes?.indexOf('markdown-external-link') >= 0)
const isAnchored = tnode.parent?.tagName === 'a';
if(isVideoThumb){
return <VideoThumb contentWidth={contentWidth} uri={imgUrl}/>;