1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-02 22:49:09 +02:00

Mobile: Fixes #1057: Handle more cases where the title text field disappear

This commit is contained in:
Laurent Cozic
2018-12-29 03:12:23 +01:00
parent 7cfc537870
commit 1b3e0f65e1
4 changed files with 17 additions and 10 deletions

View File

@@ -604,7 +604,9 @@ class NoteScreenComponent extends BaseScreenComponent {
keywords = SearchEngine.instance().allParsedQueryTerms(parsedQuery);
}
bodyComponent = <NoteBodyViewer
// Note: as of 2018-12-29 it's important not to display the viewer if the note body is empty,
// to avoid the HACK_webviewLoadingState related bug.
bodyComponent = !note || !note.body.trim() ? null : <NoteBodyViewer
onJoplinLinkClick={this.onJoplinLinkClick_}
ref="noteBodyViewer"
style={this.styles().noteBodyViewer}
@@ -614,11 +616,11 @@ class NoteScreenComponent extends BaseScreenComponent {
onCheckboxChange={(newBody) => { 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 {