From 860048c800d3bf5a6f9260495b38367475502b60 Mon Sep 17 00:00:00 2001 From: dartungar Date: Sat, 9 Mar 2024 12:16:09 +0400 Subject: [PATCH] chore: cleanup --- src/UI/noteset/noteSetEditModal.ts | 2 +- src/noteSet/noteSetService.ts | 1 - src/notes/fileService.ts | 1 + src/queues/reviewService.ts | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/UI/noteset/noteSetEditModal.ts b/src/UI/noteset/noteSetEditModal.ts index 3c9b853..a5be128 100644 --- a/src/UI/noteset/noteSetEditModal.ts +++ b/src/UI/noteset/noteSetEditModal.ts @@ -149,7 +149,7 @@ export class NoteSetEditModal extends Modal { async save() { this._plugin.settings.noteSets.forEach((noteSet, index) => { - if (noteSet.id == this._noteSet.id) { + if (noteSet.id === this._noteSet.id) { this._plugin.settings.noteSets[index] = this._noteSet; } }); diff --git a/src/noteSet/noteSetService.ts b/src/noteSet/noteSetService.ts index 5c8c466..c003c63 100644 --- a/src/noteSet/noteSetService.ts +++ b/src/noteSet/noteSetService.ts @@ -25,7 +25,6 @@ export class NoteSetService { constructor(private _app: App, private _plugin: SimpleNoteReviewPlugin) {} public getNoteSet(noteSetId: string): INoteSet { - console.log("notesetId:", noteSetId, "notesets:", this._plugin.settings.noteSets) const notesets = this._plugin.settings.noteSets.filter(x => x.id === noteSetId); if (notesets.length === 0) { throw new Error(`Noteset not found`); diff --git a/src/notes/fileService.ts b/src/notes/fileService.ts index 4201741..db11c5d 100644 --- a/src/notes/fileService.ts +++ b/src/notes/fileService.ts @@ -49,6 +49,7 @@ export class FileService { } private async getReviewFrequency(file: TFile): Promise { + const frequencyValue = await this._dataviewService.getMetadataFieldValue( file.path, this._plugin.settings.reviewFrequencyFieldName); diff --git a/src/queues/reviewService.ts b/src/queues/reviewService.ts index 22568a8..8cc31cf 100644 --- a/src/queues/reviewService.ts +++ b/src/queues/reviewService.ts @@ -143,7 +143,7 @@ export class ReviewService { const pages = ( await this._dataviewService.getNoteSetFiles(noteSet) ).filter((x) => x[freqFieldname] !== ReviewFrequency.ignore); - let sorted: DataArray>; + let sorted: DataArray>; if (this._plugin.settings.useReviewFrequency) { sorted = pages.sort(