Skip to content

A local-first personal finance app

Mobile budget file switching logical error fix (#4596)

James Skinner346727a539ea
diff --git a/packages/desktop-client/src/components/manager/BudgetList.tsx b/packages/desktop-client/src/components/manager/BudgetList.tsx
index 5cbf32e862..18b9e3e614 100644
--- a/packages/desktop-client/src/components/manager/BudgetList.tsx
+++ b/packages/desktop-client/src/components/manager/BudgetList.tsx
@@ -532,8 +532,10 @@ export function BudgetList({ showHeader = true, quickSwitchMode = false }) {
return file.state !== 'remote';
}
- const nonRemoteFiles = allFiles.filter(isNonRemoteFile);
- const files = id ? nonRemoteFiles.filter(f => f.id !== id) : allFiles;
+ // Filter out the open file
+ const files = id
+ ? allFiles.filter(file => !isNonRemoteFile(file) || file.id !== id)
+ : allFiles;
const [creating, setCreating] = useState(false);
const { isNarrowWidth } = useResponsive();
diff --git a/upcoming-release-notes/4596.md b/upcoming-release-notes/4596.md
new file mode 100644
index 0000000000..24cba3a6d7
--- /dev/null
+++ b/upcoming-release-notes/4596.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [JSkinnerUK]
+---
+
+Fix switching to remote budget files on mobile
\ No newline at end of file