Cleaner - Needs UI rebuild from Master TBD
This commit is contained in:
@@ -18,12 +18,6 @@ android {
|
||||
versionName = "1.0"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
// Correct Kotlin DSL syntax: use put() instead of += with a map literal
|
||||
arguments["room.schemaLocation"] = "$projectDir/schemas"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
@@ -48,37 +42,34 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// AndroidX & Lifecycle
|
||||
// Core & Lifecycle
|
||||
implementation(libs.androidx.core.ktx)
|
||||
implementation(libs.androidx.lifecycle.runtime.ktx)
|
||||
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
||||
implementation(libs.androidx.activity.compose)
|
||||
|
||||
// Compose (Using BOM)
|
||||
// Compose
|
||||
implementation(platform(libs.androidx.compose.bom))
|
||||
implementation(libs.androidx.compose.ui)
|
||||
implementation(libs.androidx.compose.ui.graphics)
|
||||
implementation(libs.androidx.compose.ui.tooling.preview)
|
||||
implementation(libs.androidx.compose.material3)
|
||||
implementation(libs.androidx.compose.material.icons)
|
||||
|
||||
// Navigation & Hilt Integration
|
||||
implementation(libs.androidx.navigation.compose)
|
||||
implementation(libs.androidx.hilt.navigation.compose)
|
||||
implementation(libs.hilt.android)
|
||||
implementation(libs.compose.material3)
|
||||
implementation(libs.androidx.material3)
|
||||
ksp(libs.hilt.compiler)
|
||||
|
||||
// Images
|
||||
implementation(libs.coil.compose)
|
||||
|
||||
// Tooling (Fixed to use TOML alias)
|
||||
debugImplementation(libs.androidx.compose.ui.tooling)
|
||||
|
||||
//backend2
|
||||
//room addon
|
||||
// Hilt DI
|
||||
implementation(libs.hilt.android)
|
||||
ksp(libs.hilt.compiler)
|
||||
implementation(libs.androidx.hilt.navigation.compose)
|
||||
|
||||
// Navigation
|
||||
implementation(libs.androidx.navigation.compose)
|
||||
|
||||
// Room Database
|
||||
implementation(libs.room.runtime)
|
||||
implementation(libs.room.ktx)
|
||||
ksp(libs.room.compiler)
|
||||
|
||||
// Coil Images
|
||||
implementation(libs.coil.compose)
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.placeholder.sherpai2
|
||||
|
||||
import android.app.Application
|
||||
import dagger.hilt.android.HiltAndroidApp
|
||||
|
||||
class SherpAIApplication : Application() {
|
||||
|
||||
}
|
||||
@HiltAndroidApp
|
||||
class SherpAIApplication : Application()
|
||||
@@ -3,6 +3,10 @@ package com.placeholder.sherpai2.di
|
||||
import android.content.Context
|
||||
import androidx.room.Room
|
||||
import com.placeholder.sherpai2.data.local.AppDatabase
|
||||
import com.placeholder.sherpai2.data.local.dao.ImageAggregateDao
|
||||
import com.placeholder.sherpai2.data.local.dao.ImageEventDao
|
||||
import com.placeholder.sherpai2.data.local.dao.ImageTagDao
|
||||
import com.placeholder.sherpai2.data.local.dao.TagDao
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
@@ -25,4 +29,33 @@ object DatabaseModule {
|
||||
"sherpai.db"
|
||||
).build()
|
||||
}
|
||||
|
||||
// --- Add these DAO providers ---
|
||||
|
||||
@Provides
|
||||
fun provideTagDao(database: AppDatabase): TagDao {
|
||||
return database.tagDao()
|
||||
}
|
||||
|
||||
@Provides
|
||||
fun provideImageTagDao(database: AppDatabase): ImageTagDao {
|
||||
return database.imageTagDao()
|
||||
}
|
||||
|
||||
// Add providers for your other DAOs now to avoid future errors
|
||||
@Provides
|
||||
fun provideImageDao(database: AppDatabase) = database.imageDao()
|
||||
|
||||
@Provides
|
||||
fun providePersonDao(database: AppDatabase) = database.personDao()
|
||||
|
||||
@Provides
|
||||
fun provideEventDao(database: AppDatabase) = database.eventDao()
|
||||
|
||||
@Provides
|
||||
fun provideImageEventDao(database: AppDatabase): ImageEventDao = database.imageEventDao()
|
||||
|
||||
@Provides
|
||||
fun provideImageAggregateDao(database: AppDatabase): ImageAggregateDao = database.imageAggregateDao()
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import androidx.lifecycle.viewModelScope
|
||||
import com.placeholder.sherpai2.data.local.entity.TagEntity
|
||||
import com.placeholder.sherpai2.domain.repository.TaggingRepository
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.flow.*
|
||||
import kotlinx.coroutines.launch
|
||||
import javax.inject.Inject
|
||||
@@ -17,6 +18,7 @@ import javax.inject.Inject
|
||||
* - Tag write operations
|
||||
*/
|
||||
@HiltViewModel
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
class ImageDetailViewModel @Inject constructor(
|
||||
private val tagRepository: TaggingRepository
|
||||
) : ViewModel() {
|
||||
|
||||
Reference in New Issue
Block a user