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

Fixed geolocation bug and improved saving of notes and folders

This commit is contained in:
Laurent Cozic
2017-07-16 11:17:40 +01:00
parent e2d426a986
commit cd6d8ce284
9 changed files with 56 additions and 54 deletions

View File

@@ -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 <ActionButton style={{display:'none'}}/>;
let buttonIndex = this.state.mode == 'view' ? 0 : 1;
return <ActionButton multiStates={true} buttons={buttons} buttonIndex={0} />
}
const actionButtonComp = renderActionButton();
let saveButtonDisabled = !this.isModified();
return (
<View style={this.styles().screen}>
<ScreenHeader navState={this.props.navigation.state} />
<ScreenHeader
navState={this.props.navigation.state}
showSaveButton={true}
saveButtonDisabled={saveButtonDisabled}
onSaveButtonPress={() => this.saveFolderButton_press()}
/>
<TextInput autoFocus={true} value={this.state.folder.title} onChangeText={(text) => this.title_changeText(text)} />
{ actionButtonComp }
<dialogs.DialogBox ref={dialogbox => { this.dialogbox = dialogbox }}/>
</View>
);