Merge pull request #1322 from esteemapp/bugfix/webview

Bugfix/webview
This commit is contained in:
Feruz M 2019-11-27 20:38:37 +02:00 committed by GitHub
commit 28c95f54b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 13 additions and 11 deletions

View File

@ -79,7 +79,7 @@ import com.android.build.OutputFile
project.ext.react = [ project.ext.react = [
entryFile: "index.js", entryFile: "index.js",
enableHermes: false, // clean and rebuild if changing enableHermes: true, // clean and rebuild if changing
] ]
apply from: "../../node_modules/react-native/react.gradle" apply from: "../../node_modules/react-native/react.gradle"

View File

@ -13,6 +13,7 @@
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false" android:allowBackup="false"
android:largeHeap="true"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"

View File

@ -27,7 +27,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath("com.android.tools.build:gradle:3.4.2") classpath('com.android.tools.build:gradle:3.5.2')
classpath 'com.google.gms:google-services:4.0.2' classpath 'com.google.gms:google-services:4.0.2'
classpath 'com.bugsnag:bugsnag-android-gradle-plugin:4.+' classpath 'com.bugsnag:bugsnag-android-gradle-plugin:4.+'

View File

@ -74,7 +74,7 @@
"react-native-vector-icons": "^6.6.0", "react-native-vector-icons": "^6.6.0",
"react-native-version": "^3.1.0", "react-native-version": "^3.1.0",
"react-native-version-number": "^0.3.5", "react-native-version-number": "^0.3.5",
"react-native-webview": "^7.2.7", "react-native-webview": "^7.5.2",
"react-navigation": "^4.0.10", "react-navigation": "^4.0.10",
"react-navigation-drawer": "^2.2.2", "react-navigation-drawer": "^2.2.2",
"react-navigation-redux-helpers": "^2.0.8", "react-navigation-redux-helpers": "^2.0.8",

View File

@ -36,6 +36,7 @@ export default EStyleSheet.create({
alignSelf: 'flex-end', alignSelf: 'flex-end',
position: 'absolute', position: 'absolute',
right: 0, right: 0,
bottom: -10,
}, },
voteCountText: { voteCountText: {
alignSelf: 'center', alignSelf: 'center',

View File

@ -80,6 +80,7 @@ class CommentView extends PureComponent {
<View style={[{ marginLeft: marginLeft || 29 }, styles.bodyWrapper]}> <View style={[{ marginLeft: marginLeft || 29 }, styles.bodyWrapper]}>
<PostBody <PostBody
isComment isComment
commentDepth={comment.depth}
handleOnUserPress={handleOnUserPress} handleOnUserPress={handleOnUserPress}
body={comment.body} body={comment.body}
textSelectable={false} textSelectable={false}

View File

@ -17,6 +17,7 @@ const WIDTH = Dimensions.get('window').width;
const PostBody = ({ const PostBody = ({
navigation, navigation,
body, body,
commentDepth,
isComment, isComment,
textSelectable = true, textSelectable = true,
handleOnUserPress, handleOnUserPress,
@ -208,10 +209,8 @@ const PostBody = ({
return ( return (
<Fragment> <Fragment>
<AutoHeightWebView <AutoHeightWebView
source={{ source={{ html: test }}
html: test, style={{ width: isComment ? WIDTH - (32 + 29 * commentDepth) : WIDTH - 32 }}
}}
style={{ width: isComment ? WIDTH - 61 : WIDTH - 32 }}
customStyle={customStyle} customStyle={customStyle}
onMessage={_handleOnLinkPress} onMessage={_handleOnLinkPress}
customScript={script.toString()} customScript={script.toString()}

View File

@ -7679,10 +7679,10 @@ react-native-version@^3.1.0:
resolve-from "^5.0.0" resolve-from "^5.0.0"
semver "^6.0.0" semver "^6.0.0"
react-native-webview@^7.2.7: react-native-webview@^7.5.2:
version "7.4.1" version "7.5.2"
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-7.4.1.tgz#4fe42263506ea06ec56e291dcda8dedf9e900542" resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-7.5.2.tgz#9da3006e03636faaa9d05f3abff46cd40bfb80f9"
integrity sha512-AVT5HIEEWc/NZdNwXRVev0cAs1Si0O3BA4Crqyor8JbwuxUUCllLv+NK7TO3eOw/ENl+QyIPHu9dizkoycmgJQ== integrity sha512-e2ODq2KuTchhATosONNMZIubAzmjWoHg7WK0s1R515PVeKqOc30v6KdJy8IW5/4kw/2aal+Pb7b/F4s1zp6PFQ==
dependencies: dependencies:
escape-string-regexp "2.0.0" escape-string-regexp "2.0.0"
invariant "2.2.4" invariant "2.2.4"