Skip to content

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

mobile: fix sorting trash

Ammar Ahmed7760f5e89879
diff --git a/apps/mobile/app/components/sheets/sort/index.tsx b/apps/mobile/app/components/sheets/sort/index.tsx
index 4f241f6f9..08200d49e 100644
--- a/apps/mobile/app/components/sheets/sort/index.tsx
+++ b/apps/mobile/app/components/sheets/sort/index.tsx
@@ -63,7 +63,11 @@ const Sort = ({
);
const updateGroupOptions = async (_groupOptions: GroupOptions) => {
const groupType =
- screen === "Notes" ? "home" : ((type + "s") as GroupingKey);
+ screen === "Notes"
+ ? "home"
+ : screen === "Trash"
+ ? "trash"
+ : ((type + "s") as GroupingKey);
console.log("updateGroupOptions for group", groupType, "in", screen);
await db.settings.setGroupOptions(groupType, _groupOptions);
setGroupOptions(_groupOptions);