injecting the room name provider as we're within hilts scope

This commit is contained in:
Adam Brown 2022-02-14 12:30:47 +00:00
parent c62b9949f2
commit 674aea97a8
2 changed files with 4 additions and 3 deletions

View File

@ -110,10 +110,10 @@ object VectorStaticModule {
}
@Provides
fun providesMatrixConfiguration(context: Context): MatrixConfiguration {
fun providesMatrixConfiguration(vectorRoomDisplayNameFallbackProvider: VectorRoomDisplayNameFallbackProvider): MatrixConfiguration {
return MatrixConfiguration(
applicationFlavor = BuildConfig.FLAVOR_DESCRIPTION,
roomDisplayNameFallbackProvider = VectorRoomDisplayNameFallbackProvider(context)
roomDisplayNameFallbackProvider = vectorRoomDisplayNameFallbackProvider
)
}

View File

@ -19,8 +19,9 @@ package im.vector.app.features.room
import android.content.Context
import im.vector.app.R
import org.matrix.android.sdk.api.RoomDisplayNameFallbackProvider
import javax.inject.Inject
class VectorRoomDisplayNameFallbackProvider(
class VectorRoomDisplayNameFallbackProvider @Inject constructor(
private val context: Context
) : RoomDisplayNameFallbackProvider {