Open book in current leaf in bookshelf view instead of new leaf

This commit is contained in:
Evan Fiordeliso 2025-07-07 22:33:47 -04:00
parent 7e5135d99e
commit c603475f69
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
{ {
"name": "obsidian-sample-plugin", "name": "obsidian-book-tracker",
"version": "1.0.0", "version": "1.0.0",
"description": "Simplifies tracking your reading progress and managing your book collection in Obsidian.", "description": "Simplifies tracking your reading progress and managing your book collection in Obsidian.",
"main": "main.js", "main": "main.js",

View File

@ -142,7 +142,7 @@
orientation="flat" orientation="flat"
onClick={() => onClick={() =>
plugin.app.workspace plugin.app.workspace
.getLeaf("tab") .getLeaf(false)
.openFile(bookData.file)} .openFile(bookData.file)}
/> />
{/each} {/each}
@ -157,7 +157,7 @@
design={book.design} design={book.design}
orientation={book.orientation} orientation={book.orientation}
onClick={() => onClick={() =>
plugin.app.workspace.getLeaf("tab").openFile(book.file)} plugin.app.workspace.getLeaf(false).openFile(book.file)}
/> />
{/if} {/if}
{/each} {/each}