data: pass through getModelById from ModelDao into ModelRepository

This commit is contained in:
Han Yin 2025-04-15 13:46:14 -07:00
parent 59f5caa699
commit 51b120f464
1 changed files with 4 additions and 0 deletions

View File

@ -36,6 +36,7 @@ import javax.inject.Singleton
interface ModelRepository {
fun getStorageMetrics(): Flow<StorageMetrics>
fun getModels(): Flow<List<ModelInfo>>
suspend fun getModelById(id: String): ModelInfo?
suspend fun importModel(
uri: Uri,
@ -89,6 +90,9 @@ class ModelRepositoryImpl @Inject constructor(
}
}
override suspend fun getModelById(id: String) =
modelDao.getModelById(id)?.toModelInfo()
override suspend fun importModel(
uri: Uri,
name: String?,