Merge pull request #1491 from esteemapp/mmore

remove converting script to string
This commit is contained in:
Feruz M 2020-01-15 14:11:18 +02:00 committed by GitHub
commit ade986e24f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 4 deletions

View File

@ -334,7 +334,7 @@ const CommentBody = ({
customStyle={customStyle}
onMessage={__handleOnLinkPress}
renderLoading={() => <CommentPlaceHolder />}
customScript={script.toString()}
customScript={script}
startInLoadingState={true}
onShouldStartLoadWithRequest={false}
scrollEnabled={false}

View File

@ -5,9 +5,10 @@ for (i = 0; i < images.length; i++) {
type: 'image',
href: images[i].getAttribute("src") || ''
}
var resultStr = JSON.stringify(JSON.stringify(result)); // workaround
var message = 'window.ReactNativeWebView.postMessage(' + resultStr + ')';
// workaround
var resultStr = JSON.stringify(JSON.stringify(result));
var message = 'window.ReactNativeWebView.postMessage(' + resultStr + ')';
images[i].setAttribute("onClick", message);
}

View File

@ -325,7 +325,7 @@ const PostBody = ({
style={{ width: isComment ? WIDTH - (32 + 29 * commentDepth) : WIDTH - 32 }}
customStyle={customStyle}
onMessage={_handleOnLinkPress}
customScript={script.toString()}
customScript={script}
renderLoading={() => (isComment ? <CommentPlaceHolder /> : <PostPlaceHolder />)}
startInLoadingState={true}
onShouldStartLoadWithRequest={false}