package net.squanchy.service.firestore.injection

import com.google.firebase.firestore.FirebaseFirestore
import dagger.Module
import dagger.Provides
import net.squanchy.injection.ApplicationLifecycle
import net.squanchy.service.firestore.FirestoreDbService

@Module
class FirestoreModule {

    @Provides
    @ApplicationLifecycle
    internal fun firebaseFirestore(): FirebaseFirestore {
        return FirebaseFirestore.getInstance()
    }

    @Provides
    @ApplicationLifecycle
    internal fun firebaseDbService(database: FirebaseFirestore): FirestoreDbService = FirestoreDbService(database)
}

package net.squanchy.service.firestore.injection

import com.google.firebase.firestore.FirebaseFirestore
import dagger.Module
import dagger.Provides
import net.squanchy.injection.ApplicationLifecycle
import net.squanchy.service.firestore.FirestoreDbService

@Module
class FirestoreModule {

    @Provides
    internal fun firebaseFirestore(): FirebaseFirestore {
        return FirebaseFirestore.getInstance()
    }

    @Provides
    @ApplicationLifecycle
    internal fun firebaseDbService(database: FirebaseFirestore): FirestoreDbService = FirestoreDbService(database)
}

Remove the @ApplicationLifecycle from Firestore
Remove the @ApplicationLifecycle from Firestore

We don't need it; we were doing it because we assumed that was the
issue causing the crash, but it isn't.

squanchy-dev/squanchy-android,squanchy-dev/squanchy-android,squanchy-dev/squanchy-android