diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt
index e0316017f2..19ae4e873d 100644
--- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt
+++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt
@@ -209,13 +209,7 @@ class MessageItemFactory @Inject constructor(
is MessageAudioContent -> buildAudioContent(params, messageContent, informationData, highlight, attributes)
is MessageVerificationRequestContent -> buildVerificationRequestMessageItem(messageContent, informationData, highlight, callback, attributes)
is MessagePollContent -> buildPollItem(messageContent, informationData, highlight, callback, attributes)
- is MessageLocationContent -> {
- if (vectorPreferences.labsRenderLocationsInTimeline()) {
- buildLocationItem(messageContent, informationData, highlight, attributes)
- } else {
- buildMessageTextItem(messageContent.body, false, informationData, highlight, callback, attributes)
- }
- }
+ is MessageLocationContent -> buildLocationItem(messageContent, informationData, highlight, attributes)
is MessageBeaconInfoContent -> liveLocationShareMessageItemFactory.create(params.event, highlight, attributes)
else -> buildNotHandledMessageItem(messageContent, informationData, highlight, callback, attributes)
}
diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/style/TimelineMessageLayoutFactory.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/style/TimelineMessageLayoutFactory.kt
index 80405077e7..3d6dee371f 100644
--- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/style/TimelineMessageLayoutFactory.kt
+++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/style/TimelineMessageLayoutFactory.kt
@@ -62,16 +62,15 @@ class TimelineMessageLayoutFactory @Inject constructor(
MessageType.MSGTYPE_STICKER_LOCAL,
MessageType.MSGTYPE_EMOTE,
MessageType.MSGTYPE_BEACON_INFO,
+ MessageType.MSGTYPE_LOCATION,
+ MessageType.MSGTYPE_BEACON_LOCATION_DATA,
)
private val MSG_TYPES_WITH_TIMESTAMP_INSIDE_MESSAGE = setOf(
MessageType.MSGTYPE_IMAGE,
MessageType.MSGTYPE_VIDEO,
MessageType.MSGTYPE_BEACON_INFO,
- )
-
- private val MSG_TYPES_WITH_LOCATION_DATA = setOf(
MessageType.MSGTYPE_LOCATION,
- MessageType.MSGTYPE_BEACON_LOCATION_DATA
+ MessageType.MSGTYPE_BEACON_LOCATION_DATA,
)
}
@@ -147,14 +146,12 @@ class TimelineMessageLayoutFactory @Inject constructor(
private fun MessageContent?.isPseudoBubble(): Boolean {
if (this == null) return false
- if (msgType == MessageType.MSGTYPE_LOCATION) return vectorPreferences.labsRenderLocationsInTimeline()
return this.msgType in MSG_TYPES_WITH_PSEUDO_BUBBLE_LAYOUT
}
private fun MessageContent?.timestampInsideMessage(): Boolean {
return when {
this == null -> false
- msgType in MSG_TYPES_WITH_LOCATION_DATA -> vectorPreferences.labsRenderLocationsInTimeline()
else -> msgType in MSG_TYPES_WITH_TIMESTAMP_INSIDE_MESSAGE
}
}
@@ -162,7 +159,6 @@ class TimelineMessageLayoutFactory @Inject constructor(
private fun MessageContent?.shouldAddMessageOverlay(): Boolean {
return when {
this == null || msgType == MessageType.MSGTYPE_BEACON_INFO -> false
- msgType == MessageType.MSGTYPE_LOCATION -> vectorPreferences.labsRenderLocationsInTimeline()
else -> msgType in MSG_TYPES_WITH_TIMESTAMP_INSIDE_MESSAGE
}
}
diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt b/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt
index 385e552754..9d3edeb25a 100755
--- a/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt
+++ b/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt
@@ -200,7 +200,6 @@ class VectorPreferences @Inject constructor(
private const val TAKE_PHOTO_VIDEO_MODE = "TAKE_PHOTO_VIDEO_MODE"
- private const val SETTINGS_LABS_RENDER_LOCATIONS_IN_TIMELINE = "SETTINGS_LABS_RENDER_LOCATIONS_IN_TIMELINE"
private const val SETTINGS_LABS_ENABLE_LIVE_LOCATION = "SETTINGS_LABS_ENABLE_LIVE_LOCATION"
// This key will be used to identify clients with the old thread support enabled io.element.thread
@@ -1041,10 +1040,6 @@ class VectorPreferences @Inject constructor(
}
}
- fun labsRenderLocationsInTimeline(): Boolean {
- return defaultPrefs.getBoolean(SETTINGS_LABS_RENDER_LOCATIONS_IN_TIMELINE, true)
- }
-
fun labsEnableLiveLocation(): Boolean {
return defaultPrefs.getBoolean(SETTINGS_LABS_ENABLE_LIVE_LOCATION, false)
}
diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml
index 166c28a158..a7bc4683a1 100644
--- a/vector/src/main/res/values/strings.xml
+++ b/vector/src/main/res/values/strings.xml
@@ -3021,6 +3021,7 @@
Enable location sharing
Once enabled you will be able to send your location to any room
+
Render user locations in the timeline
Failed to load map
Live location enabled
diff --git a/vector/src/main/res/xml/vector_settings_labs.xml b/vector/src/main/res/xml/vector_settings_labs.xml
index 19ee7e366f..9b9293e2e2 100644
--- a/vector/src/main/res/xml/vector_settings_labs.xml
+++ b/vector/src/main/res/xml/vector_settings_labs.xml
@@ -64,11 +64,6 @@
android:summary="@string/labs_auto_report_uisi_desc"
android:title="@string/labs_auto_report_uisi" />
-
-