From fdf1b4c69bbc27245cb94c2bda2494c078143299 Mon Sep 17 00:00:00 2001 From: Bill Date: Mon, 20 Oct 2025 07:52:39 -0400 Subject: [PATCH] refactor: waypoint-utils to use IVaultAdapter - Change WaypointUtils.isFolderNote() signature to accept IVaultAdapter instead of App - Update method body to use vault.read() instead of app.vault.read() - Callers will be updated in next commit --- src/utils/waypoint-utils.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils/waypoint-utils.ts b/src/utils/waypoint-utils.ts index 6785690..172714d 100644 --- a/src/utils/waypoint-utils.ts +++ b/src/utils/waypoint-utils.ts @@ -1,4 +1,5 @@ -import { App, TFile } from 'obsidian'; +import { TFile } from 'obsidian'; +import { IVaultAdapter } from '../adapters/interfaces'; /** * Waypoint block information @@ -87,7 +88,7 @@ export class WaypointUtils { * 1. Has the same basename as its parent folder, OR * 2. Contains waypoint markers */ - static async isFolderNote(app: App, file: TFile): Promise { + static async isFolderNote(vault: IVaultAdapter, file: TFile): Promise { const basename = file.basename; const parentFolder = file.parent; @@ -97,7 +98,7 @@ export class WaypointUtils { // Check for waypoint markers let hasWaypoint = false; try { - const content = await app.vault.read(file); + const content = await vault.read(file); hasWaypoint = this.hasWaypointMarker(content); } catch (error) { // If we can't read the file, we can't check for waypoints