mirror of
https://github.com/gearheaded/obsidian-github-contributions.git
synced 2026-07-22 07:43:36 +00:00
fix: await/void revealLeaf promise to satisfy minAppVersion check
This commit is contained in:
parent
73773014e9
commit
4ad9bd1227
5 changed files with 14 additions and 7 deletions
4
main.js
4
main.js
|
|
@ -1181,13 +1181,13 @@ var GitHubContributionsPlugin = class extends import_obsidian.Plugin {
|
|||
async activateView() {
|
||||
const existing = this.app.workspace.getLeavesOfType(VIEW_TYPE);
|
||||
if (existing.length > 0) {
|
||||
this.app.workspace.revealLeaf(existing[0]);
|
||||
void this.app.workspace.revealLeaf(existing[0]);
|
||||
return;
|
||||
}
|
||||
const leaf = this.app.workspace.getRightLeaf(false);
|
||||
if (leaf) {
|
||||
await leaf.setViewState({ type: VIEW_TYPE, active: true });
|
||||
this.app.workspace.revealLeaf(leaf);
|
||||
void this.app.workspace.revealLeaf(leaf);
|
||||
}
|
||||
}
|
||||
async loadSettings() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "github-contributions",
|
||||
"name": "GitHub Contributions",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"minAppVersion": "1.0.0",
|
||||
"description": "View GitHub and local Git contributions directly in the sidebar with streak tracking, repository breakdowns, color palettes, and daily note integration.",
|
||||
"author": "gearheaded",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "obsidian-github-contributions",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"description": "GitHub contribution graph for Obsidian",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
10
src/main.ts
10
src/main.ts
|
|
@ -1556,9 +1556,15 @@ export default class GitHubContributionsPlugin extends Plugin {
|
|||
|
||||
async activateView() {
|
||||
const existing = this.app.workspace.getLeavesOfType(VIEW_TYPE);
|
||||
if (existing.length > 0) { this.app.workspace.revealLeaf(existing[0]); return; }
|
||||
if (existing.length > 0) {
|
||||
void this.app.workspace.revealLeaf(existing[0]);
|
||||
return;
|
||||
}
|
||||
const leaf = this.app.workspace.getRightLeaf(false);
|
||||
if (leaf) { await leaf.setViewState({ type: VIEW_TYPE, active: true }); this.app.workspace.revealLeaf(leaf); }
|
||||
if (leaf) {
|
||||
await leaf.setViewState({ type: VIEW_TYPE, active: true });
|
||||
void this.app.workspace.revealLeaf(leaf);
|
||||
}
|
||||
}
|
||||
|
||||
async loadSettings() {
|
||||
|
|
|
|||
|
|
@ -3,5 +3,6 @@
|
|||
"1.0.1": "0.15.0",
|
||||
"1.0.2": "0.15.0",
|
||||
"1.0.3": "1.0.0",
|
||||
"1.0.4": "1.0.0"
|
||||
"1.0.4": "1.0.0",
|
||||
"1.0.5": "1.0.0"
|
||||
}
|
||||
Loading…
Reference in a new issue