Skip to content

Commit

Permalink
Added IncomingLinksView (shd b IncomingZettelView)
Browse files Browse the repository at this point in the history
  • Loading branch information
flengyel committed Jul 4, 2023
1 parent a649cf9 commit 79135bb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
18 changes: 18 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
"name": "Zettel View",
"icon": "media/dep.svg",
"contextualTitle": "Zettelkasten View"
},
{
"id": "incomingZettelView",
"name": "Incoming Zettels",
"contextualTitle": "Incoming Zettel View"
}
]
},
Expand All @@ -37,6 +42,11 @@
"command": "zettelView.refreshEntry",
"when": "view == zettelView",
"group": "navigation"
},
{
"command": "incomingLinksView.refreshEntry",
"when": "view == incomingLinksView",
"group": "navigation"
}
],
"explorer/context": [
Expand Down Expand Up @@ -66,6 +76,14 @@
{
"command": "zettelView.renameEntry",
"title": "Rename and replace links"
},
{
"command": "incomingLinksView.refreshEntry",
"title": "Refresh Incoming Links",
"icon": {
"light": "resources/light/refresh.svg",
"dark": "resources/dark/refresh.svg"
}
}
],
"configuration": {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/MyLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as vscode from 'vscode';
// Until I add someone else's logger to the list of dependencies,
// you'll have to put up with self-contained code.

export class myLogger {
export class MyLogger {
static readonly myExtension = "Zettel View";
static readonly logOutputChannel = vscode.window.createOutputChannel(this.myExtension);
static logMsg(msg : string): void {
Expand Down
5 changes: 2 additions & 3 deletions src/utils/updateIncomingLinksMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ export async function updateIncomingLinksMap(

for (const sourceID of incomingLinksForOldID) {
incomingLinksMap.addLink(newID, sourceID);
}

for (const sourceID of incomingLinksForOldID) {
incomingLinksMap.removeLink(oldID, sourceID);
}
}


0 comments on commit 79135bb

Please sign in to comment.