Skip to content

Commit 0fe3e81

Browse files
committed
fix pane resizing
1 parent 808be54 commit 0fe3e81

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/mainPage/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ export async function initMainPage (
4343
}
4444

4545
export async function refreshUI (outliner: OutlineManager) {
46+
const store = outliner?.context?.session?.store
47+
const paneRegistry = outliner?.context?.session?.paneRegistry
48+
const subjectUri = window.document.location.href
49+
const paneName = window.history.state?.paneName
50+
const pane = paneName ? paneRegistry?.byName?.(paneName) : undefined
51+
52+
if (store && typeof outliner?.GotoSubject === 'function') {
53+
outliner.GotoSubject(store.sym(subjectUri), true, pane, true, undefined)
54+
}
55+
4656
await refreshHeader(outliner)
4757
refreshMenu(outliner.context.environment?.layout === 'mobile' ? 'mobile' : 'desktop')
4858
}

0 commit comments

Comments
 (0)