mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
Renaming userId into locationUserId in message location item
This commit is contained in:
parent
8b628229ed
commit
adbc430ac8
3 changed files with 5 additions and 5 deletions
|
@ -237,14 +237,14 @@ class MessageItemFactory @Inject constructor(
|
|||
urlMapProvider.buildStaticMapUrl(it, INITIAL_MAP_ZOOM_IN_TIMELINE, width, height)
|
||||
}
|
||||
|
||||
val userId = if (locationContent.isSelfLocation()) informationData.senderId else null
|
||||
val locationUserId = if (locationContent.isSelfLocation()) informationData.senderId else null
|
||||
|
||||
return MessageLocationItem_()
|
||||
.attributes(attributes)
|
||||
.locationUrl(locationUrl)
|
||||
.mapWidth(width)
|
||||
.mapHeight(height)
|
||||
.userId(userId)
|
||||
.locationUserId(locationUserId)
|
||||
.locationPinProvider(locationPinProvider)
|
||||
.highlighted(highlight)
|
||||
.leftGuideline(avatarSizeProvider.leftGuideline)
|
||||
|
|
|
@ -41,7 +41,7 @@ abstract class AbsMessageLocationItem<H : AbsMessageLocationItem.Holder> : AbsMe
|
|||
var locationUrl: String? = null
|
||||
|
||||
@EpoxyAttribute
|
||||
var userId: String? = null
|
||||
var locationUserId: String? = null
|
||||
|
||||
@EpoxyAttribute
|
||||
var mapWidth: Int = 0
|
||||
|
@ -89,7 +89,7 @@ abstract class AbsMessageLocationItem<H : AbsMessageLocationItem.Holder> : AbsMe
|
|||
target: Target<Drawable>?,
|
||||
dataSource: DataSource?,
|
||||
isFirstResource: Boolean): Boolean {
|
||||
locationPinProvider?.create(userId) { pinDrawable ->
|
||||
locationPinProvider?.create(locationUserId) { pinDrawable ->
|
||||
// we are not using Glide since it does not display it correctly when there is no user photo
|
||||
holder.staticMapPinImageView.setImageDrawable(pinDrawable)
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ abstract class MessageLiveLocationItem : AbsMessageLocationItem<MessageLiveLocat
|
|||
|
||||
private fun bindLocationLiveBanner(holder: Holder) {
|
||||
// TODO add check on device id to confirm that is the one that sent the beacon
|
||||
val isEmitter = currentUserId != null && currentUserId == userId
|
||||
val isEmitter = currentUserId != null && currentUserId == locationUserId
|
||||
val messageLayout = attributes.informationData.messageLayout
|
||||
val viewState = buildViewState(holder, messageLayout, isEmitter)
|
||||
holder.locationLiveMessageBanner.isVisible = true
|
||||
|
|
Loading…
Reference in a new issue