Skip to content

Commit

Permalink
Merge pull request #301 from TeamBeMyPlan/feature/299
Browse files Browse the repository at this point in the history
[feature] #299 DI 모듈 관련 코드 수정
  • Loading branch information
hansh0101 authored Jun 20, 2022
2 parents 93d1fa4 + fb6f7c9 commit c0cab89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import com.google.firebase.analytics.ktx.analytics
import com.google.firebase.ktx.Firebase
import javax.inject.Inject

class FirebaseAnalyticsProvider() {
@Inject
lateinit var beMyPlanDataStore: BeMyPlanDataStore

val parameters = Bundle().apply {
class FirebaseAnalyticsProvider @Inject constructor(
private val beMyPlanDataStore: BeMyPlanDataStore
) {
private val parameters = Bundle().apply {
this.putString("device", "Android")
this.putInt("userId", beMyPlanDataStore.userId)
}
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/co/kr/bemyplan/di/SingletonModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ object SingletonModule {

@Provides
@Singleton
fun provideFirebaseAnalytics() = FirebaseAnalyticsProvider()
fun provideFirebaseAnalytics(beMyPlanDataStore: BeMyPlanDataStore) =
FirebaseAnalyticsProvider(beMyPlanDataStore)
}

0 comments on commit c0cab89

Please sign in to comment.