From 9962ec981ca57b14a49896a6b04790e30ed9bc16 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Fri, 22 May 2026 23:12:58 -0400 Subject: [PATCH] fix(android): @Provides for the three library DAOs LibraryRepository needs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LibraryRepository @Inject-constructs with CachedArtistDao, CachedAlbumDao, CachedTrackDao. Hilt errored at hiltJavaCompileDebug with "MissingBinding" for all three — Phase 4 only added the @Provides bridge for AuthSessionDao in slice 10 (its single consumer). Same one-line bridge per DAO: `db.()` from the AppDatabase accessor. Future DAOs land in DatabaseModule when their first @Inject-constructed consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../minstrel/cache/db/DatabaseModule.kt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/android/app/src/main/java/com/fabledsword/minstrel/cache/db/DatabaseModule.kt b/android/app/src/main/java/com/fabledsword/minstrel/cache/db/DatabaseModule.kt index 15b35315..9110a894 100644 --- a/android/app/src/main/java/com/fabledsword/minstrel/cache/db/DatabaseModule.kt +++ b/android/app/src/main/java/com/fabledsword/minstrel/cache/db/DatabaseModule.kt @@ -3,6 +3,9 @@ package com.fabledsword.minstrel.cache.db import android.content.Context import androidx.room.Room import com.fabledsword.minstrel.cache.db.dao.AuthSessionDao +import com.fabledsword.minstrel.cache.db.dao.CachedAlbumDao +import com.fabledsword.minstrel.cache.db.dao.CachedArtistDao +import com.fabledsword.minstrel.cache.db.dao.CachedTrackDao import dagger.Module import dagger.Provides import dagger.hilt.InstallIn @@ -31,5 +34,17 @@ object DatabaseModule { @Singleton fun provideAuthSessionDao(db: AppDatabase): AuthSessionDao = db.authSessionDao() + @Provides + @Singleton + fun provideCachedArtistDao(db: AppDatabase): CachedArtistDao = db.cachedArtistDao() + + @Provides + @Singleton + fun provideCachedAlbumDao(db: AppDatabase): CachedAlbumDao = db.cachedAlbumDao() + + @Provides + @Singleton + fun provideCachedTrackDao(db: AppDatabase): CachedTrackDao = db.cachedTrackDao() + private const val DATABASE_NAME = "minstrel.db" }