Skip to content

Commit

Permalink
Update project
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbel committed Nov 9, 2024
1 parent 1516b77 commit 29a77e7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/src/main/kotlin/org/michaelbel/template/AppModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.koin.android.ext.koin.androidContext
import org.koin.androidx.viewmodel.dsl.viewModelOf
import org.koin.dsl.module
import org.michaelbel.template.datastore.AppPreferences
import org.michaelbel.template.interactor.AppInteractor
import org.michaelbel.template.repository.AppRepository

val appModule = module {
Expand All @@ -17,5 +18,6 @@ val appModule = module {
AppPreferences(dataStore)
}
single<AppRepository> { AppRepository(get()) }
single<AppInteractor> { AppInteractor(get()) }
viewModelOf(::MainViewModel)
}
4 changes: 2 additions & 2 deletions app/src/main/kotlin/org/michaelbel/template/MainViewModel.kt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.michaelbel.template

import org.michaelbel.core.viewmodel.BaseViewModel
import org.michaelbel.template.repository.AppRepository
import org.michaelbel.template.interactor.AppInteractor

class MainViewModel(
private val appRepository: AppRepository
private val appInteractor: AppInteractor
): BaseViewModel()
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package org.michaelbel.template.interactor

import org.michaelbel.template.repository.AppRepository

class AppInteractor(
private val appRepository: AppRepository
)

0 comments on commit 29a77e7

Please sign in to comment.