Mobile budget file switching logical error fix (#4596)

* Fix logical error to filter out just the current file from list of files, rather than excluding remote files.

* Add release note and update comment
This commit is contained in:
James Skinner
2025-03-12 14:45:30 +00:00
committed by GitHub
parent ddcd771488
commit 346727a539
2 changed files with 10 additions and 2 deletions

View File

@@ -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();

View File

@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [JSkinnerUK]
---
Fix switching to remote budget files on mobile