Fixed layout bug

pull/41/head
Laurent Cozic 2017-08-02 17:55:03 +00:00
parent 303af9004d
commit d9083fa2ed
1 changed files with 11 additions and 12 deletions

View File

@ -121,18 +121,6 @@ class NotesScreenComponent extends BaseScreenComponent {
render() {
const parent = this.parentItem();
if (!parent) {
return (
<View style={this.styles().screen}>
<ScreenHeader title={title} menuOptions={this.menuOptions()} />
</View>
)
}
let title = parent ? parent.title : null;
const addFolderNoteButtons = this.props.selectedFolderId && this.props.selectedFolderId != Folder.conflictFolderId();
const theme = themeStyle(this.props.theme);
let rootStyle = {
@ -144,6 +132,17 @@ class NotesScreenComponent extends BaseScreenComponent {
rootStyle.flex = 0.001; // This is a bit of a hack but it seems to work fine - it makes the component invisible but without unmounting it
}
if (!parent) {
return (
<View style={rootStyle}>
<ScreenHeader title={title} menuOptions={this.menuOptions()} />
</View>
)
}
let title = parent ? parent.title : null;
const addFolderNoteButtons = this.props.selectedFolderId && this.props.selectedFolderId != Folder.conflictFolderId();
return (
<View style={rootStyle}>
<ScreenHeader title={title} menuOptions={this.menuOptions()} />