fix(desktop): Refresh file contents when changing workspaces to not have stale contents (#11728)

This commit is contained in:
Parker Smith
2026-02-04 13:27:02 -07:00
committed by GitHub
parent 912098928a
commit 41bc4ec7f0
2 changed files with 20 additions and 3 deletions

View File

@@ -1670,6 +1670,22 @@ export default function Page() {
void (refresh ? file.tree.refresh("") : file.tree.list(""))
})
createEffect(
on(
() => params.dir,
() => {
void file.tree.list("")
const active = tabs().active()
if (!active) return
const path = file.pathFromTab(active)
if (!path) return
void file.load(path, { force: true })
},
{ defer: true },
),
)
const autoScroll = createAutoScroll({
working: () => true,
overflowAnchor: "dynamic",