Skip to content

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

mobile: remove dateEdited from sort options in Tags screen

ammarahm-ed604d2c4ee9a0
diff --git a/apps/mobile/app/components/sheets/sort/index.js b/apps/mobile/app/components/sheets/sort/index.js
index 061783b11..e95cd80b7 100644
--- a/apps/mobile/app/components/sheets/sort/index.js
+++ b/apps/mobile/app/components/sheets/sort/index.js
@@ -35,7 +35,6 @@ const Sort = ({ type, screen }) => {
const [groupOptions, setGroupOptions] = useState(
db.settings.getGroupOptions(type)
);
-
const updateGroupOptions = async (_groupOptions) => {
await db.settings.setGroupOptions(type, _groupOptions);
@@ -141,7 +140,8 @@ const Sort = ({ type, screen }) => {
/>
) : (
Object.keys(SORT).map((item) =>
- item === "title" && groupOptions.groupBy !== "none" ? null : (
+ (item === "title" && groupOptions.groupBy !== "none") ||
+ (screen === "Tags" && item === "dateEdited") ? null : (
<Button
key={item}
type={groupOptions.sortBy === item ? "grayBg" : "gray"}
diff --git a/apps/mobile/app/utils/constants.js b/apps/mobile/app/utils/constants.js
index a4bbafa9a..d7fb05705 100644
--- a/apps/mobile/app/utils/constants.js
+++ b/apps/mobile/app/utils/constants.js
@@ -35,6 +35,7 @@ export const GROUP = {
};
export const SORT = {
+ dateModified: "Date modified",
dateEdited: "Date edited",
dateCreated: "Date created",
title: "Title"