mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
Show live location sharing option even if labs flag is disabled.
This commit is contained in:
parent
65bc4acbab
commit
9641ff132d
1 changed files with 1 additions and 9 deletions
|
@ -41,7 +41,6 @@ import im.vector.app.features.home.AvatarRenderer
|
|||
import im.vector.app.features.home.room.detail.timeline.helper.MatrixItemColorProvider
|
||||
import im.vector.app.features.location.live.duration.ChooseLiveDurationBottomSheet
|
||||
import im.vector.app.features.location.option.LocationSharingOption
|
||||
import im.vector.app.features.settings.VectorPreferences
|
||||
import org.matrix.android.sdk.api.util.MatrixItem
|
||||
import java.lang.ref.WeakReference
|
||||
import javax.inject.Inject
|
||||
|
@ -53,7 +52,6 @@ class LocationSharingFragment @Inject constructor(
|
|||
private val urlMapProvider: UrlMapProvider,
|
||||
private val avatarRenderer: AvatarRenderer,
|
||||
private val matrixItemColorProvider: MatrixItemColorProvider,
|
||||
private val vectorPreferences: VectorPreferences,
|
||||
) : VectorBaseFragment<FragmentLocationSharingBinding>(),
|
||||
LocationTargetChangeListener,
|
||||
VectorBaseBottomSheetDialogFragment.ResultListener {
|
||||
|
@ -223,13 +221,7 @@ class LocationSharingFragment @Inject constructor(
|
|||
private fun updateMap(state: LocationSharingViewState) {
|
||||
// first, update the options view
|
||||
val options: Set<LocationSharingOption> = when (state.areTargetAndUserLocationEqual) {
|
||||
true -> {
|
||||
if (vectorPreferences.labsEnableLiveLocation()) {
|
||||
setOf(LocationSharingOption.USER_CURRENT, LocationSharingOption.USER_LIVE)
|
||||
} else {
|
||||
setOf(LocationSharingOption.USER_CURRENT)
|
||||
}
|
||||
}
|
||||
true -> setOf(LocationSharingOption.USER_CURRENT, LocationSharingOption.USER_LIVE)
|
||||
false -> setOf(LocationSharingOption.PINNED)
|
||||
else -> emptySet()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue