mirror of
https://github.com/caffa/Obsidian-Current-Folder-Note-Display-Plugin.git
synced 2026-07-22 09:50:27 +00:00
Fixed up the unloading - refresh view will remove other leaves
This commit is contained in:
parent
b661cddd80
commit
a0dcdabed2
1 changed files with 6 additions and 0 deletions
6
main.ts
6
main.ts
|
|
@ -138,6 +138,12 @@ export default class CurrentFolderNotesDisplay extends Plugin {
|
|||
// A leaf with our view already exists, use that
|
||||
const view = leaves[0].view as CurrentFolderNotesDisplayView;
|
||||
await view.displayNotesInCurrentFolder();
|
||||
|
||||
// Remove all other leaves
|
||||
for (let i = 1; i < leaves.length; i++) {
|
||||
leaves[i].detach();
|
||||
}
|
||||
|
||||
} else {
|
||||
// new Notice('Could not find the view');
|
||||
this.activateView();
|
||||
|
|
|
|||
Loading…
Reference in a new issue