Skip to content

Commit

Permalink
fix: deleted files are removed from all queues
Browse files Browse the repository at this point in the history
  • Loading branch information
dartungar committed Mar 8, 2024
1 parent 0a10aa8 commit c7787d3
Show file tree
Hide file tree
Showing 12 changed files with 388 additions and 228 deletions.
14 changes: 8 additions & 6 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default class SimpleNoteReviewPlugin extends Plugin {
"play",
"Simple Note Review: Continue Review of Current Note Set",
(evt: MouseEvent) => {
this.reviewService.startReview(this.settings.currentNoteSet);
this.reviewService.startReview(this.settings.currentNoteSetId);
}
);

Expand All @@ -60,6 +60,8 @@ export default class SimpleNoteReviewPlugin extends Plugin {
this.addSettingTab(
new SimpleNoteReviewPluginSettingsTab(this, this.app)
);

this.app.vault.on("delete", file => this.noteSetService.onPhysicalDeleteNote(file));
}

onunload() {}
Expand Down Expand Up @@ -93,7 +95,7 @@ export default class SimpleNoteReviewPlugin extends Plugin {
id: "start-review",
name: "Start reviewing notes in current note set",
callback: () => {
this.reviewService.startReview(this.settings.currentNoteSet);
this.reviewService.startReview(this.settings.currentNoteSetId);
},
});

Expand All @@ -110,7 +112,7 @@ export default class SimpleNoteReviewPlugin extends Plugin {
name: "Open random note from the current note set",
callback: () => {
this.reviewService.openRandomNoteInQueue(
this.settings.currentNoteSet
this.settings.currentNoteSetId
);
},
});
Expand All @@ -120,7 +122,7 @@ export default class SimpleNoteReviewPlugin extends Plugin {
name: "reset queue for the current note set",
callback: () => {
this.reviewService.resetNotesetQueue(
this.settings.currentNoteSet
this.settings.currentNoteSetId
);
},
});
Expand All @@ -139,7 +141,7 @@ export default class SimpleNoteReviewPlugin extends Plugin {
callback: () => {
this.reviewService.reviewNote(
this.app.workspace.getActiveFile(),
this.settings.currentNoteSet
this.settings.currentNoteSetId
);
},
});
Expand Down Expand Up @@ -194,7 +196,7 @@ export default class SimpleNoteReviewPlugin extends Plugin {
callback: () => {
this.reviewService.skipNote(
this.app.workspace.getActiveFile(),
this.settings.currentNoteSet
this.settings.currentNoteSetId
);
},
});
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "simple-note-review",
"name": "Simple Note Review",
"version": "1.2.3",
"version": "1.2.4",
"minAppVersion": "1.1.0",
"description": "Simple, customizable plugin for easy note review, resurfacing & repetition.",
"author": "dartungar",
Expand Down
Loading

0 comments on commit c7787d3

Please sign in to comment.