diff --git a/CliClient/package.json b/CliClient/package.json index 9ee061126..993949607 100644 --- a/CliClient/package.json +++ b/CliClient/package.json @@ -7,7 +7,7 @@ "url": "https://github.com/laurent22/joplin" }, "url": "git://github.com/laurent22/joplin.git", - "version": "0.8.42", + "version": "0.8.43", "bin": { "joplin": "./main_launcher.js" }, diff --git a/ReactNativeClient/android/app/build.gradle b/ReactNativeClient/android/app/build.gradle index 7267542bf..762eddd58 100644 --- a/ReactNativeClient/android/app/build.gradle +++ b/ReactNativeClient/android/app/build.gradle @@ -90,8 +90,8 @@ android { applicationId "net.cozic.joplin" minSdkVersion 16 targetSdkVersion 22 - versionCode 14 - versionName "0.9.1" + versionCode 16 + versionName "0.9.3" ndk { abiFilters "armeabi-v7a", "x86" } diff --git a/ReactNativeClient/android/app/src/main/AndroidManifest.xml b/ReactNativeClient/android/app/src/main/AndroidManifest.xml index 8db097b2c..aec1174cf 100644 --- a/ReactNativeClient/android/app/src/main/AndroidManifest.xml +++ b/ReactNativeClient/android/app/src/main/AndroidManifest.xml @@ -7,7 +7,7 @@ - + + + Save + + + ); + } + let key = 0; let menuOptionComponents = []; for (let i = 0; i < this.props.menuOptions.length; i++) { @@ -130,6 +156,7 @@ class ScreenHeaderComponent extends Component { { sideMenuButton(styles, () => this.sideMenuButton_press()) } { backButton(styles, () => this.backButton_press(), !this.props.historyCanGoBack) } + { saveButton(styles, () => { if (this.props.onSaveButtonPress) this.props.onSaveButtonPress() }, this.props.saveButtonDisabled === true, this.props.showSaveButton === true) } {title} this.menu_select(value)}> diff --git a/ReactNativeClient/lib/components/screens/folder.js b/ReactNativeClient/lib/components/screens/folder.js index 6521d91cb..125dc14e7 100644 --- a/ReactNativeClient/lib/components/screens/folder.js +++ b/ReactNativeClient/lib/components/screens/folder.js @@ -83,31 +83,17 @@ class FolderScreenComponent extends BaseScreenComponent { } render() { - const renderActionButton = () => { - let buttons = []; - - buttons.push({ - title: _('Save'), - icon: 'md-checkmark', - onPress: () => { - this.saveFolderButton_press() - }, - }); - - if (!this.isModified()) return ; - - let buttonIndex = this.state.mode == 'view' ? 0 : 1; - - return - } - - const actionButtonComp = renderActionButton(); + let saveButtonDisabled = !this.isModified(); return ( - + this.saveFolderButton_press()} + /> this.title_changeText(text)} /> - { actionButtonComp } { this.dialogbox = dialogbox }}/> ); diff --git a/ReactNativeClient/lib/components/screens/note.js b/ReactNativeClient/lib/components/screens/note.js index 362492198..9a39dbd50 100644 --- a/ReactNativeClient/lib/components/screens/note.js +++ b/ReactNativeClient/lib/components/screens/note.js @@ -271,13 +271,8 @@ class NoteScreenComponent extends BaseScreenComponent { ); } - let title = null; - let noteHeaderTitle = note && note.title ? note.title : _('New note'); - if (folder) { - title = folder.title + ' > ' + noteHeaderTitle; - } else { - title = noteHeaderTitle; - } + let headerTitle = '' + if (folder) headerTitle = folder.title; const renderActionButton = () => { let buttons = []; @@ -290,27 +285,26 @@ class NoteScreenComponent extends BaseScreenComponent { }, }); - buttons.push({ - title: _('Save'), - icon: 'md-checkmark', - onPress: () => { - this.saveNoteButton_press(); - return false; - }, - }); + if (this.state.mode == 'edit') return ; - if (this.state.mode == 'edit' && !this.isModified()) return ; - - let buttonIndex = this.state.mode == 'view' ? 0 : 1; - - return + return } const actionButtonComp = renderActionButton(); + let showSaveButton = this.state.mode == 'edit'; + let saveButtonDisabled = !this.isModified(); + return ( - + this.saveNoteButton_press()} + /> { isTodo && { this.todoCheckbox_change(checked) }} /> } this.title_changeText(text)} /> diff --git a/ReactNativeClient/lib/geolocation-react.js b/ReactNativeClient/lib/geolocation-react.js index 6dbc5ba09..1f6bb6075 100644 --- a/ReactNativeClient/lib/geolocation-react.js +++ b/ReactNativeClient/lib/geolocation-react.js @@ -16,11 +16,6 @@ class GeolocationReact { } static currentPosition(options = null) { - if (typeof navigator === 'undefined') { - // TODO - return Promise.resolve(this.currentPosition_testResponse()); - } - if (!options) options = {}; if (!('enableHighAccuracy' in options)) options.enableHighAccuracy = true; if (!('timeout' in options)) options.timeout = 10000; diff --git a/ReactNativeClient/lib/synchronizer.js b/ReactNativeClient/lib/synchronizer.js index c2130763d..661d66bc4 100644 --- a/ReactNativeClient/lib/synchronizer.js +++ b/ReactNativeClient/lib/synchronizer.js @@ -50,7 +50,7 @@ class Synchronizer { if (report.createLocal) lines.push(_('Created local items: %d.', report.createLocal)); if (report.updateLocal) lines.push(_('Updated local items: %d.', report.updateLocal)); if (report.createRemote) lines.push(_('Created remote items: %d.', report.createRemote)); - if (report.updatedRemote) lines.push(_('Updated remote items: %d.', report.updatedRemote)); + if (report.updateRemote) lines.push(_('Updated remote items: %d.', report.updateRemote)); if (report.deleteLocal) lines.push(_('Deleted local items: %d.', report.deleteLocal)); if (report.deleteRemote) lines.push(_('Deleted remote items: %d.', report.deleteRemote)); if (report.state) lines.push(_('State: %s.', report.state.replace(/_/g, ' '))); @@ -76,7 +76,7 @@ class Synchronizer { if (remote) { let s = []; - s.push(remote.id); + s.push(remote.id ? remote.id : remote.path); if ('title' in remote) s.push('"' + remote.title + '"'); line.push('(Remote ' + s.join(', ') + ')'); } diff --git a/ReactNativeClient/root.js b/ReactNativeClient/root.js index 366341d2a..7d3144468 100644 --- a/ReactNativeClient/root.js +++ b/ReactNativeClient/root.js @@ -283,7 +283,7 @@ async function initialize(dispatch, backButtonHandler) { dbLogger.addTarget('database', { database: logDatabase, source: 'm' }); if (Setting.value('env') == 'dev') dbLogger.addTarget('console'); if (Setting.value('env') == 'dev') { - dbLogger.setLevel(Logger.LEVEL_DEBUG); // Set to LEVEL_DEBUG for full SQL queries + dbLogger.setLevel(Logger.LEVEL_INFO); // Set to LEVEL_DEBUG for full SQL queries } else { dbLogger.setLevel(Logger.LEVEL_INFO); }