Skip to content

Commit

Permalink
fix: set icon with interface not super access
Browse files Browse the repository at this point in the history
Signed-off-by: edonyzpc <[email protected]>
  • Loading branch information
edonyzpc committed Mar 15, 2024
1 parent 7a7d335 commit 5716020
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ export class RecordPreview extends ItemView {
plugin.log("startup new RecordList");
super(leaf);
addIcon('PluginAST_PREVIEW', icons['PluginAST_PREVIEW']);
super.icon = 'PluginAST_PREVIEW';
super.navigation = false;
this.app = app;
this.plugin = plugin;
this.files = [];
Expand All @@ -33,6 +31,10 @@ export class RecordPreview extends ItemView {
return "Records Preview";
}

getIcon(): string {
return "PluginAST_PREVIEW";
}

async onOpen() {
const dir = await this.app.vault.adapter.list(this.plugin.settings.targetPath);
const files = dir.files.sort((file1, file2) => {
Expand Down

0 comments on commit 5716020

Please sign in to comment.