Skip to content

Commit a28dea6

Browse files
committed
Add missing state param and todo
1 parent 3a107bd commit a28dea6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

web/src/lib/diff-viewer.svelte.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,7 @@ export class MultiFileDiffViewerState {
321321
}
322322
});
323323

324-
afterNavigate((nav) => {
325-
this.afterNavigate(nav);
326-
});
324+
afterNavigate((nav) => this.afterNavigate(nav));
327325

328326
this.registerKeybinds();
329327
}
@@ -605,6 +603,8 @@ export class MultiFileDiffViewerState {
605603
await animationFramePromise();
606604

607605
if (this.urlSelection) {
606+
// TODO: This does store store the proper scroll offset on initial load
607+
608608
const urlSelection = this.urlSelection;
609609
this.urlSelection = undefined;
610610
const file = this.fileDetails.find((f) => f.toFile === urlSelection.file);
@@ -625,6 +625,7 @@ export class MultiFileDiffViewerState {
625625
} else {
626626
await goto(`?${page.url.searchParams}`, {
627627
keepFocus: true,
628+
state: this.createPageState(),
628629
});
629630
}
630631
}

0 commit comments

Comments
 (0)