diff --git a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/di/HomeSpacesModule.kt b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/di/HomeSpacesModule.kt index aee2ad6b8f..e8631431ca 100644 --- a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/di/HomeSpacesModule.kt +++ b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/di/HomeSpacesModule.kt @@ -7,16 +7,16 @@ package io.element.android.features.home.impl.di -import com.squareup.anvil.annotations.ContributesTo -import dagger.Binds -import dagger.Module +import dev.zacsweers.metro.BindingContainer +import dev.zacsweers.metro.Binds +import dev.zacsweers.metro.ContributesTo import io.element.android.features.home.impl.spaces.HomeSpacesPresenter import io.element.android.features.home.impl.spaces.HomeSpacesState import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.di.SessionScope +@BindingContainer @ContributesTo(SessionScope::class) -@Module interface HomeSpacesModule { @Binds fun bindHomeSpacesPresenter(presenter: HomeSpacesPresenter): Presenter diff --git a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/spaces/HomeSpacesPresenter.kt b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/spaces/HomeSpacesPresenter.kt index 138fbbd0bc..29ceca14bf 100644 --- a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/spaces/HomeSpacesPresenter.kt +++ b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/spaces/HomeSpacesPresenter.kt @@ -11,6 +11,7 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.runtime.remember +import dev.zacsweers.metro.Inject import io.element.android.features.invite.api.SeenInvitesStore import io.element.android.features.invite.api.seenSpaceIds import io.element.android.libraries.architecture.Presenter @@ -19,9 +20,9 @@ import io.element.android.libraries.matrix.api.MatrixClient import kotlinx.collections.immutable.persistentSetOf import kotlinx.collections.immutable.toPersistentSet import kotlinx.coroutines.flow.map -import javax.inject.Inject -class HomeSpacesPresenter @Inject constructor( +@Inject +class HomeSpacesPresenter( private val client: MatrixClient, private val seenInvitesStore: SeenInvitesStore, ) : Presenter {