mirror of
https://github.com/laurent22/joplin.git
synced 2025-02-01 19:15:01 +02:00
Mobile: Fixes #1057: Fix missing title field issue in Android
This commit is contained in:
parent
8fcb46ca4a
commit
f38b907680
@ -90,8 +90,8 @@ android {
|
|||||||
applicationId "net.cozic.joplin"
|
applicationId "net.cozic.joplin"
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode 2097437
|
versionCode 2097459
|
||||||
versionName "1.0.201"
|
versionName "1.0.223"
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters "armeabi-v7a", "x86"
|
abiFilters "armeabi-v7a", "x86"
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,8 @@ class NoteBodyViewer extends Component {
|
|||||||
if (!this.isMounted_) return;
|
if (!this.isMounted_) return;
|
||||||
this.setState({ webViewLoaded: true });
|
this.setState({ webViewLoaded: true });
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
||||||
|
if (this.props.onLoadEnd) this.props.onLoadEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
shouldComponentUpdate(nextProps, nextState) {
|
shouldComponentUpdate(nextProps, nextState) {
|
||||||
|
@ -63,6 +63,15 @@ class NoteScreenComponent extends BaseScreenComponent {
|
|||||||
noteTagDialogShown: false,
|
noteTagDialogShown: false,
|
||||||
fromShare: false,
|
fromShare: false,
|
||||||
showCamera: false,
|
showCamera: false,
|
||||||
|
|
||||||
|
// HACK: For reasons I can't explain, when the WebView is present, the TextInput initially does not display (It's just a white rectangle with
|
||||||
|
// no visible text). It will only appear when tapping it or doing certain action like selecting text on the webview. The bug started to
|
||||||
|
// appear one day and did not go away - reverting to an old RN version did not help, undoing all
|
||||||
|
// the commits till a working version did not help. The bug also does not happen in the simulator which makes it hard to fix.
|
||||||
|
// Eventually, a way that "worked" is to add a 1px margin on top of the text input just after the webview has loaded, then removing this
|
||||||
|
// margin. This forces RN to update the text input and to display it. Maybe that hack can be removed once RN is upgraded.
|
||||||
|
// See https://github.com/laurent22/joplin/issues/1057
|
||||||
|
HACK_webviewLoadingState: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
// iOS doesn't support multiline text fields properly so disable it
|
// iOS doesn't support multiline text fields properly so disable it
|
||||||
@ -602,6 +611,14 @@ class NoteScreenComponent extends BaseScreenComponent {
|
|||||||
note={note}
|
note={note}
|
||||||
highlightedKeywords={keywords}
|
highlightedKeywords={keywords}
|
||||||
onCheckboxChange={(newBody) => { onCheckboxChange(newBody) }}
|
onCheckboxChange={(newBody) => { onCheckboxChange(newBody) }}
|
||||||
|
onLoadEnd={() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({ HACK_webviewLoadingState: this.state.HACK_webviewLoadingState + 1 });
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({ HACK_webviewLoadingState: this.state.HACK_webviewLoadingState + 1 });
|
||||||
|
}, 50);
|
||||||
|
}, 50);
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
} else {
|
} else {
|
||||||
const focusBody = !isNew && !!note.title;
|
const focusBody = !isNew && !!note.title;
|
||||||
@ -649,6 +666,7 @@ class NoteScreenComponent extends BaseScreenComponent {
|
|||||||
|
|
||||||
let titleTextInputStyle = {
|
let titleTextInputStyle = {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
|
marginTop: 0,
|
||||||
paddingLeft: 0,
|
paddingLeft: 0,
|
||||||
color: theme.color,
|
color: theme.color,
|
||||||
backgroundColor: theme.backgroundColor,
|
backgroundColor: theme.backgroundColor,
|
||||||
@ -668,6 +686,10 @@ class NoteScreenComponent extends BaseScreenComponent {
|
|||||||
paddingBottom: 10, // Added for iOS (Not needed for Android??)
|
paddingBottom: 10, // Added for iOS (Not needed for Android??)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.state.HACK_webviewLoadingState === 1) {
|
||||||
|
titleTextInputStyle.marginTop = 1;
|
||||||
|
}
|
||||||
|
|
||||||
const dueDate = isTodo && note.todo_due ? new Date(note.todo_due) : null;
|
const dueDate = isTodo && note.todo_due ? new Date(note.todo_due) : null;
|
||||||
|
|
||||||
const titleComp = (
|
const titleComp = (
|
||||||
|
@ -261,7 +261,8 @@ class JoplinDatabase extends Database {
|
|||||||
// default value and thus might cause problems. In that case, the default value
|
// default value and thus might cause problems. In that case, the default value
|
||||||
// must be set in the synchronizer too.
|
// must be set in the synchronizer too.
|
||||||
|
|
||||||
const existingDatabaseVersions = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
|
// Note: v16 and v17 don't do anything. They were used to debug an issue.
|
||||||
|
const existingDatabaseVersions = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17];
|
||||||
|
|
||||||
let currentVersionIndex = existingDatabaseVersions.indexOf(fromVersion);
|
let currentVersionIndex = existingDatabaseVersions.indexOf(fromVersion);
|
||||||
|
|
||||||
|
43
ReactNativeClient/package-lock.json
generated
43
ReactNativeClient/package-lock.json
generated
@ -1016,7 +1016,7 @@
|
|||||||
},
|
},
|
||||||
"ansi-colors": {
|
"ansi-colors": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "http://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
|
||||||
"integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==",
|
"integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-wrap": "^0.1.0"
|
"ansi-wrap": "^0.1.0"
|
||||||
@ -2832,14 +2832,14 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"kind-of": {
|
"kind-of": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "http://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz",
|
||||||
"integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ="
|
"integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"external-editor": {
|
"external-editor": {
|
||||||
"version": "2.2.0",
|
"version": "2.2.0",
|
||||||
"resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz",
|
||||||
"integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==",
|
"integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"chardet": "^0.4.0",
|
"chardet": "^0.4.0",
|
||||||
@ -3112,13 +3112,11 @@
|
|||||||
},
|
},
|
||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"balanced-match": "^1.0.0",
|
"balanced-match": "^1.0.0",
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
@ -3131,13 +3129,11 @@
|
|||||||
},
|
},
|
||||||
"code-point-at": {
|
"code-point-at": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"concat-map": {
|
"concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"bundled": true,
|
"bundled": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"console-control-strings": {
|
"console-control-strings": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
@ -3244,8 +3240,7 @@
|
|||||||
},
|
},
|
||||||
"inherits": {
|
"inherits": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"bundled": true,
|
"bundled": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"ini": {
|
"ini": {
|
||||||
"version": "1.3.5",
|
"version": "1.3.5",
|
||||||
@ -3255,7 +3250,6 @@
|
|||||||
"is-fullwidth-code-point": {
|
"is-fullwidth-code-point": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"number-is-nan": "^1.0.0"
|
"number-is-nan": "^1.0.0"
|
||||||
}
|
}
|
||||||
@ -3268,7 +3262,6 @@
|
|||||||
"minimatch": {
|
"minimatch": {
|
||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
}
|
}
|
||||||
@ -3368,8 +3361,7 @@
|
|||||||
},
|
},
|
||||||
"number-is-nan": {
|
"number-is-nan": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"bundled": true,
|
"bundled": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"object-assign": {
|
"object-assign": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
@ -3484,7 +3476,6 @@
|
|||||||
"string-width": {
|
"string-width": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"code-point-at": "^1.0.0",
|
"code-point-at": "^1.0.0",
|
||||||
"is-fullwidth-code-point": "^1.0.0",
|
"is-fullwidth-code-point": "^1.0.0",
|
||||||
@ -3808,7 +3799,7 @@
|
|||||||
},
|
},
|
||||||
"http-errors": {
|
"http-errors": {
|
||||||
"version": "1.6.3",
|
"version": "1.6.3",
|
||||||
"resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
|
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
|
||||||
"integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
|
"integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"depd": "~1.1.2",
|
"depd": "~1.1.2",
|
||||||
@ -4924,7 +4915,7 @@
|
|||||||
},
|
},
|
||||||
"jsonfile": {
|
"jsonfile": {
|
||||||
"version": "2.4.0",
|
"version": "2.4.0",
|
||||||
"resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
|
||||||
"integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
|
"integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"graceful-fs": "^4.1.6"
|
"graceful-fs": "^4.1.6"
|
||||||
@ -5997,7 +5988,7 @@
|
|||||||
},
|
},
|
||||||
"opn": {
|
"opn": {
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
"resolved": "http://registry.npmjs.org/opn/-/opn-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/opn/-/opn-3.0.3.tgz",
|
||||||
"integrity": "sha1-ttmec5n3jWXDuq/+8fsojpuFJDo=",
|
"integrity": "sha1-ttmec5n3jWXDuq/+8fsojpuFJDo=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"object-assign": "^4.0.1"
|
"object-assign": "^4.0.1"
|
||||||
@ -6172,7 +6163,7 @@
|
|||||||
},
|
},
|
||||||
"pegjs": {
|
"pegjs": {
|
||||||
"version": "0.10.0",
|
"version": "0.10.0",
|
||||||
"resolved": "http://registry.npmjs.org/pegjs/-/pegjs-0.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/pegjs/-/pegjs-0.10.0.tgz",
|
||||||
"integrity": "sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0="
|
"integrity": "sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0="
|
||||||
},
|
},
|
||||||
"performance-now": {
|
"performance-now": {
|
||||||
@ -6286,7 +6277,7 @@
|
|||||||
},
|
},
|
||||||
"pretty-format": {
|
"pretty-format": {
|
||||||
"version": "4.3.1",
|
"version": "4.3.1",
|
||||||
"resolved": "http://registry.npmjs.org/pretty-format/-/pretty-format-4.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-4.3.1.tgz",
|
||||||
"integrity": "sha1-UwvlxCs8BbNkFKeipDN6qArNDo0="
|
"integrity": "sha1-UwvlxCs8BbNkFKeipDN6qArNDo0="
|
||||||
},
|
},
|
||||||
"private": {
|
"private": {
|
||||||
@ -7266,7 +7257,7 @@
|
|||||||
},
|
},
|
||||||
"readable-stream": {
|
"readable-stream": {
|
||||||
"version": "2.3.6",
|
"version": "2.3.6",
|
||||||
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
||||||
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"core-util-is": "~1.0.0",
|
"core-util-is": "~1.0.0",
|
||||||
@ -8411,7 +8402,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"rimraf": {
|
"rimraf": {
|
||||||
"version": "2.2.8",
|
"version": "2.2.8",
|
||||||
"resolved": "http://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz",
|
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz",
|
||||||
"integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI="
|
"integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8437,7 +8428,7 @@
|
|||||||
},
|
},
|
||||||
"through": {
|
"through": {
|
||||||
"version": "2.3.8",
|
"version": "2.3.8",
|
||||||
"resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz",
|
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
|
||||||
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
|
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
|
||||||
},
|
},
|
||||||
"through2": {
|
"through2": {
|
||||||
@ -9048,7 +9039,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"sax": {
|
"sax": {
|
||||||
"version": "1.1.6",
|
"version": "1.1.6",
|
||||||
"resolved": "http://registry.npmjs.org/sax/-/sax-1.1.6.tgz",
|
"resolved": "https://registry.npmjs.org/sax/-/sax-1.1.6.tgz",
|
||||||
"integrity": "sha1-XWFr6KXmB9VOEUr65Vt+ry/MMkA="
|
"integrity": "sha1-XWFr6KXmB9VOEUr65Vt+ry/MMkA="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user