Skip to content

Commit

Permalink
✨ アプリ層に databaseModule を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsutakein committed Dec 11, 2023
1 parent 8cf9a4a commit 01531e2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package club.nito.app

import android.content.Context
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.SystemBarStyle
Expand All @@ -12,6 +13,7 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.toArgb
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import club.nito.app.shared.NitoApp
import org.koin.dsl.module

class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
Expand All @@ -37,7 +39,10 @@ class MainActivity : ComponentActivity() {
NitoApp(
shouldKeepOnScreen = { shouldKeep = it },
initKoin = {
modules(appModule)
modules(
appModule,
module { single<Context> { this@MainActivity.applicationContext } },
)
},
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import club.nito.app.shared.di.featureModules
import club.nito.app.shared.di.nitoDateFormatterModule
import club.nito.app.shared.di.userMessageStateHolderModule
import club.nito.core.data.di.dataModule
import club.nito.core.database.di.databaseModule
import club.nito.core.datastore.di.dataStoreModule
import club.nito.core.domain.di.useCaseModule
import club.nito.core.model.BuildConfig
Expand Down Expand Up @@ -35,6 +36,7 @@ class KmpEntryPoint {
supabaseClientModule,
remoteDataSourceModule,
// fakeRemoteDataSourceModule,
databaseModule,
dataStoreModule,
dataModule,
useCaseModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import club.nito.app.shared.di.featureModules
import club.nito.app.shared.di.nitoDateFormatterModule
import club.nito.app.shared.di.userMessageStateHolderModule
import club.nito.core.data.di.dataModule
import club.nito.core.database.di.databaseModule
import club.nito.core.datastore.di.dataStoreModule
import club.nito.core.designsystem.theme.NitoTheme
import club.nito.core.domain.di.useCaseModule
Expand Down Expand Up @@ -45,6 +46,7 @@ fun NitoApp(
remoteDataSourceModule,
// fakeRemoteDataSourceModule,
dataStoreModule,
databaseModule,
dataModule,
useCaseModule,

Expand Down

0 comments on commit 01531e2

Please sign in to comment.