fix(app): navigate to tabs when opening file

This commit is contained in:
adamelmore 2026-01-27 08:17:00 -06:00
commit eac2d4c699
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
2 changed files with 29 additions and 3 deletions

View file

@ -26,7 +26,7 @@ type Entry = {
type DialogSelectFileMode = "all" | "files"
export function DialogSelectFile(props: { mode?: DialogSelectFileMode }) {
export function DialogSelectFile(props: { mode?: DialogSelectFileMode; onOpenFile?: (path: string) => void }) {
const command = useCommand()
const language = useLanguage()
const layout = useLayout()
@ -164,6 +164,7 @@ export function DialogSelectFile(props: { mode?: DialogSelectFileMode }) {
tabs().open(value)
file.load(path)
view().reviewPanel.open()
props.onOpenFile?.(path)
}
const handleSelect = (item: Entry | undefined) => {