Using @AndroidEntryPoint for map fragment

This commit is contained in:
Maxime NATUREL 2022-05-30 11:21:23 +02:00
parent 7f2279c8a8
commit 1756fa26e1
2 changed files with 4 additions and 7 deletions

View File

@ -64,7 +64,6 @@ import im.vector.app.features.home.room.list.RoomListFragment
import im.vector.app.features.home.room.threads.list.views.ThreadListFragment
import im.vector.app.features.location.LocationPreviewFragment
import im.vector.app.features.location.LocationSharingFragment
import im.vector.app.features.location.live.map.LocationLiveMapViewFragment
import im.vector.app.features.login.LoginCaptchaFragment
import im.vector.app.features.login.LoginFragment
import im.vector.app.features.login.LoginGenericTextInputFormFragment
@ -1006,9 +1005,4 @@ interface FragmentModule {
@IntoMap
@FragmentKey(LocationPreviewFragment::class)
fun bindLocationPreviewFragment(fragment: LocationPreviewFragment): Fragment
@Binds
@IntoMap
@FragmentKey(LocationLiveMapViewFragment::class)
fun bindLocationLiveMapViewFragment(fragment: LocationLiveMapViewFragment): Fragment
}

View File

@ -33,6 +33,7 @@ import com.mapbox.mapboxsdk.maps.SupportMapFragment
import com.mapbox.mapboxsdk.plugins.annotation.SymbolManager
import com.mapbox.mapboxsdk.plugins.annotation.SymbolOptions
import com.mapbox.mapboxsdk.style.layers.Property
import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R
import im.vector.app.core.extensions.addChildFragment
import im.vector.app.core.platform.VectorBaseFragment
@ -48,10 +49,12 @@ import javax.inject.Inject
/**
* Screen showing a map with all the current users sharing their live location in a room.
*/
@AndroidEntryPoint
class LocationLiveMapViewFragment @Inject constructor(
private var urlMapProvider: UrlMapProvider,
) : VectorBaseFragment<FragmentSimpleContainerBinding>() {
@Inject lateinit var urlMapProvider: UrlMapProvider
private val viewModel: LocationLiveMapViewModel by fragmentViewModel()
private var mapboxMap: WeakReference<MapboxMap>? = null