Skip to content

Commit

Permalink
Remove settings transfer for ribbon icon
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnovov committed Jan 26, 2024
1 parent ec31a6d commit 8cf1e87
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
11 changes: 0 additions & 11 deletions src/homepage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,6 @@ export class Homepage {
this.data.commands = [];
this.save();
}

if (this.data?.hasRibbonIcon == false) {
this.app.workspace.onLayoutReady(async () => {
const ribbon = this.app.workspace.leftRibbon;
ribbon.items.find(i => i.id === "homepage:Open homepage")!.hidden = true;
ribbon.onChange(true);

delete this.data.hasRibbonIcon;
this.save();
});
}
}

async open(alternate: boolean = false): Promise<void> {
Expand Down
10 changes: 0 additions & 10 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,6 @@ declare module "obsidian" {
parentSplit: WorkspaceSplit;
}

interface WorkspaceRibbon {
items: WorkspaceRibbonItem[];
onChange: (a: boolean) => void;
}

interface WorkspaceRibbonItem {
id: string;
hidden: boolean;
}

interface WorkspaceSplit {
children: any[];
}
Expand Down

0 comments on commit 8cf1e87

Please sign in to comment.