mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-14 18:27:44 +02:00
This commit is contained in:
parent
68aefd5e4c
commit
08d4b5a714
@ -93,7 +93,7 @@ class ActionButtonComponent extends React.Component {
|
||||
}
|
||||
|
||||
if (!buttonComps.length && !this.props.mainButton) {
|
||||
return <ReactNativeActionButton style={{ display: 'none' }} />;
|
||||
return null;
|
||||
}
|
||||
|
||||
const mainButton = this.props.mainButton ? this.props.mainButton : {};
|
||||
|
@ -227,9 +227,12 @@ class NotesScreenComponent extends BaseScreenComponent {
|
||||
);
|
||||
}
|
||||
|
||||
const addFolderNoteButtons = this.props.selectedFolderId && this.props.selectedFolderId != Folder.conflictFolderId();
|
||||
let buttonFolderId = this.props.selectedFolderId != Folder.conflictFolderId() ? this.props.selectedFolderId : null;
|
||||
if (!buttonFolderId) buttonFolderId = this.props.activeFolderId;
|
||||
|
||||
const addFolderNoteButtons = !!buttonFolderId;
|
||||
const thisComp = this;
|
||||
const actionButtonComp = this.props.noteSelectionEnabled || !this.props.visible ? null : <ActionButton addFolderNoteButtons={addFolderNoteButtons} parentFolderId={this.props.selectedFolderId}></ActionButton>;
|
||||
const actionButtonComp = this.props.noteSelectionEnabled || !this.props.visible ? null : <ActionButton addFolderNoteButtons={addFolderNoteButtons} parentFolderId={buttonFolderId}></ActionButton>;
|
||||
|
||||
return (
|
||||
<View style={rootStyle}>
|
||||
@ -250,6 +253,7 @@ const NotesScreen = connect(state => {
|
||||
return {
|
||||
folders: state.folders,
|
||||
tags: state.tags,
|
||||
activeFolderId: state.settings.activeFolderId,
|
||||
selectedFolderId: state.selectedFolderId,
|
||||
selectedNoteIds: state.selectedNoteIds,
|
||||
selectedTagId: state.selectedTagId,
|
||||
|
@ -252,7 +252,12 @@ class Setting extends BaseModel {
|
||||
|
||||
'sync.maxConcurrentConnections': { value: 5, type: Setting.TYPE_INT, public: true, advanced: true, section: 'sync', label: () => _('Max concurrent connections'), minimum: 1, maximum: 20, step: 1 },
|
||||
|
||||
// The active folder ID is guaranteed to be valid as long as there's at least one
|
||||
// existing folder, so it is a good default in contexts where there's no currently
|
||||
// selected folder. It corresponds in general to the currently selected folder or
|
||||
// to the last folder that was selected.
|
||||
activeFolderId: { value: '', type: Setting.TYPE_STRING, public: false },
|
||||
|
||||
firstStart: { value: true, type: Setting.TYPE_BOOL, public: false },
|
||||
locale: {
|
||||
value: defaultLocale(),
|
||||
|
Loading…
Reference in New Issue
Block a user