Compare commits

...

1 Commits

Author SHA1 Message Date
Ammar Ahmed
2b7bc5731f mobile: fix crash in list 2025-04-28 11:34:10 +05:00
2 changed files with 3 additions and 2 deletions

View File

@@ -67,8 +67,9 @@ const Sort = ({
? "home"
: screen === "Trash"
? "trash"
: screen === "Favorites"
? "favorites"
: ((type + "s") as GroupingKey);
console.log("updateGroupOptions for group", groupType, "in", screen);
await db.settings.setGroupOptions(groupType, _groupOptions);
setGroupOptions(_groupOptions);
setTimeout(() => {

View File

@@ -32,7 +32,7 @@ export function useGroupOptions(type: any) {
const onUpdate = (groupType: string) => {
if (groupType !== type) return;
const options = db.settings?.getGroupOptions(type) as any;
if (!options) return;
if (
groupOptions?.groupBy !== options.groupBy ||
groupOptions?.sortBy !== options.sortBy ||