1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

All: Allow sorting notes by various fields

This commit is contained in:
Laurent Cozic
2018-02-22 18:58:15 +00:00
parent 74d255c056
commit 8a96cf3434
13 changed files with 252 additions and 51 deletions

View File

@@ -283,6 +283,16 @@ class ScreenHeaderComponent extends Component {
);
}
function sortButton(styles, onPress) {
return (
<TouchableOpacity onPress={onPress}>
<View style={styles.iconButton}>
<Icon name='md-funnel' style={styles.topIcon} />
</View>
</TouchableOpacity>
);
}
let key = 0;
let menuOptionComponents = [];
@@ -424,6 +434,7 @@ class ScreenHeaderComponent extends Component {
const backButtonComp = backButton(this.styles(), () => this.backButton_press(), !this.props.historyCanGoBack);
const searchButtonComp = this.props.noteSelectionEnabled ? null : searchButton(this.styles(), () => this.searchButton_press());
const deleteButtonComp = this.props.noteSelectionEnabled ? deleteButton(this.styles(), () => this.deleteButton_press()) : null;
const sortButtonComp = this.props.sortButton_press ? sortButton(this.styles(), () => this.props.sortButton_press()) : null;
const windowHeight = Dimensions.get('window').height - 50;
const menuComp = (
@@ -448,6 +459,7 @@ class ScreenHeaderComponent extends Component {
{ titleComp }
{ searchButtonComp }
{ deleteButtonComp }
{ sortButtonComp }
{ menuComp }
</View>
{ warningComp }