From 17a9d1851f36b7d53d8112a8f99f950bdca1cee6 Mon Sep 17 00:00:00 2001 From: Ammar Ahmed Date: Tue, 27 Feb 2024 13:23:03 +0500 Subject: [PATCH] mobile: allow sort by title in all groupings --- apps/mobile/app/components/sheets/sort/index.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/apps/mobile/app/components/sheets/sort/index.js b/apps/mobile/app/components/sheets/sort/index.js index fc4e6f001..6019fc07f 100644 --- a/apps/mobile/app/components/sheets/sort/index.js +++ b/apps/mobile/app/components/sheets/sort/index.js @@ -148,9 +148,6 @@ const Sort = ({ type, screen }) => { ) : ( Object.keys(SORT).map((item) => (item === "dueDate" && screen !== "Reminders") || - (item === "title" && - groupOptions.groupBy !== "none" && - screen !== "TopicSheet") || ((screen !== "Tags" || screen !== "Reminders") && item === "dateModified") || ((screen === "Tags" || screen === "Reminders") && @@ -233,12 +230,8 @@ const Sort = ({ type, screen }) => { if (item === "abc") { _groupOptions.sortBy = "title"; _groupOptions.sortDirection = "asc"; - } else { - if (groupOptions.sortBy === "title") { - _groupOptions.sortBy = "dateEdited"; - _groupOptions.sortDirection = "desc"; - } } + updateGroupOptions(_groupOptions); }} height={40}