diff --git a/ReactNativeClient/android/app/build.gradle b/ReactNativeClient/android/app/build.gradle index a06efc887..1c96b6f16 100644 --- a/ReactNativeClient/android/app/build.gradle +++ b/ReactNativeClient/android/app/build.gradle @@ -90,8 +90,8 @@ android { applicationId "net.cozic.joplin" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 2097461 - versionName "1.0.225" + versionCode 2097467 + versionName "1.0.231" ndk { abiFilters "armeabi-v7a", "x86" } diff --git a/ReactNativeClient/lib/components/note-body-viewer.js b/ReactNativeClient/lib/components/note-body-viewer.js index 9a597d916..92f77fad1 100644 --- a/ReactNativeClient/lib/components/note-body-viewer.js +++ b/ReactNativeClient/lib/components/note-body-viewer.js @@ -29,6 +29,10 @@ class NoteBodyViewer extends Component { } onLoadEnd() { + setTimeout(() => { + if (this.props.onLoadEnd) this.props.onLoadEnd(); + }, 100); + if (this.state.webViewLoaded) return; // Need to display after a delay to avoid a white flash before @@ -37,8 +41,6 @@ class NoteBodyViewer extends Component { if (!this.isMounted_) return; this.setState({ webViewLoaded: true }); }, 100); - - if (this.props.onLoadEnd) this.props.onLoadEnd(); } shouldComponentUpdate(nextProps, nextState) { diff --git a/ReactNativeClient/lib/components/screens/note.js b/ReactNativeClient/lib/components/screens/note.js index 81f5312c8..82b82f22f 100644 --- a/ReactNativeClient/lib/components/screens/note.js +++ b/ReactNativeClient/lib/components/screens/note.js @@ -604,7 +604,9 @@ class NoteScreenComponent extends BaseScreenComponent { keywords = SearchEngine.instance().allParsedQueryTerms(parsedQuery); } - bodyComponent = { onCheckboxChange(newBody) }} onLoadEnd={() => { setTimeout(() => { - this.setState({ HACK_webviewLoadingState: this.state.HACK_webviewLoadingState + 1 }); + this.setState({ HACK_webviewLoadingState: 1 }); setTimeout(() => { - this.setState({ HACK_webviewLoadingState: this.state.HACK_webviewLoadingState + 1 }); + this.setState({ HACK_webviewLoadingState: 0 }); }, 50); - }, 50); + }, 5); }} /> } else { diff --git a/Tools/release-android.js b/Tools/release-android.js index ed448b0a5..9ab1e4461 100644 --- a/Tools/release-android.js +++ b/Tools/release-android.js @@ -47,6 +47,8 @@ function gradleVersionName(content) { } async function main() { + console.info('Updating version numbers in build.gradle...'); + const projectName = 'joplin-android'; const newContent = updateGradleConfig(); const version = gradleVersionName(newContent); @@ -59,10 +61,10 @@ async function main() { console.info('Running from: ' + process.cwd()); - console.info('Building APK file...'); + console.info('Building APK file v' + version + '...'); let restoreDir = null; - let apkBuildCmd = 'assembleRelease -PbuildDir=build --console plain'; + let apkBuildCmd = 'assembleRelease -PbuildDir=build'; // --console plain if (await fileExists('/mnt/c/Windows/System32/cmd.exe')) { apkBuildCmd = '/mnt/c/Windows/System32/cmd.exe /c "cd ReactNativeClient\\android && gradlew.bat ' + apkBuildCmd + '"'; } else { @@ -72,6 +74,7 @@ async function main() { } // const output = await execCommand('/mnt/c/Windows/System32/cmd.exe /c "cd ReactNativeClient\\android && gradlew.bat assembleRelease -PbuildDir=build --console plain"'); + console.info(apkBuildCmd); const output = await execCommand(apkBuildCmd); console.info(output);