Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix grouping not working once alphabetical grouping is selected.

ammarahm-ed321bf915375d
diff --git a/apps/mobile/src/components/SortDialog/index.js b/apps/mobile/src/components/SortDialog/index.js
index 794176317..d0e23db77 100644
--- a/apps/mobile/src/components/SortDialog/index.js
+++ b/apps/mobile/src/components/SortDialog/index.js
@@ -195,8 +195,14 @@ class SortDialog extends React.Component {
...groupOptions,
groupBy: GROUP[item]
};
- if (item === "alphabetical") {
- _groupOptions.sortBy = "title"
+
+
+ if (item === 'alphabetical') {
+ _groupOptions.sortBy = 'title';
+ } else {
+ if (this.state.groupOptions.sortBy === 'title') {
+ _groupOptions.sortBy = 'dateEdited';
+ }
}
this.updateGroupOptions(_groupOptions);