mobile: allow sort by title in all groupings

This commit is contained in:
Ammar Ahmed
2024-02-27 13:23:03 +05:00
committed by Abdullah Atta
parent 17f68b5315
commit 17a9d1851f

View File

@@ -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}