From 4cfb79d56694cc6b56715fedc7041b5d0efb13e1 Mon Sep 17 00:00:00 2001 From: Maxime NATUREL Date: Mon, 25 Jul 2022 14:49:49 +0200 Subject: [PATCH] Small renamings to be more consistent --- .../timeline/item/MessageLiveLocationItem.kt | 4 +-- .../live/LocationLiveRunningBannerView.kt | 16 +++++------ .../item_timeline_event_location_stub.xml | 2 +- .../view_location_live_running_banner.xml | 28 +++++++++---------- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLiveLocationItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLiveLocationItem.kt index 03b9a04008..b35b4dff8b 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLiveLocationItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLiveLocationItem.kt @@ -26,8 +26,8 @@ import im.vector.app.core.resources.toTimestamp import im.vector.app.core.utils.DimensionConverter import im.vector.app.features.home.room.detail.RoomDetailAction import im.vector.app.features.home.room.detail.timeline.style.TimelineMessageLayout -import im.vector.app.features.location.live.LocationLiveRunningBannerView import im.vector.app.features.location.live.LocationLiveMessageBannerViewState +import im.vector.app.features.location.live.LocationLiveRunningBannerView import org.threeten.bp.LocalDateTime @EpoxyModelClass @@ -112,7 +112,7 @@ abstract class MessageLiveLocationItem : AbsMessageLocationItem(R.id.locationLiveMessageBanner) + val locationLiveRunningBanner by bind(R.id.locationLiveRunningBanner) } companion object { diff --git a/vector/src/main/java/im/vector/app/features/location/live/LocationLiveRunningBannerView.kt b/vector/src/main/java/im/vector/app/features/location/live/LocationLiveRunningBannerView.kt index 1786ccdb8b..4ca8475da1 100644 --- a/vector/src/main/java/im/vector/app/features/location/live/LocationLiveRunningBannerView.kt +++ b/vector/src/main/java/im/vector/app/features/location/live/LocationLiveRunningBannerView.kt @@ -49,16 +49,16 @@ class LocationLiveRunningBannerView @JvmOverloads constructor( ) val stopButton: Button - get() = binding.locationLiveMessageBannerStop + get() = binding.locationLiveRunningBannerStop private val background: ImageView - get() = binding.locationLiveMessageBannerBackground + get() = binding.locationLiveRunningBannerBackground private val title: TextView - get() = binding.locationLiveMessageBannerTitle + get() = binding.locationLiveRunningBannerTitle private val subTitle: TextView - get() = binding.locationLiveMessageBannerSubTitle + get() = binding.locationLiveRunningBannerSubTitle private var countDownTimer: CountDownTimer? = null @@ -70,7 +70,7 @@ class LocationLiveRunningBannerView @JvmOverloads constructor( GlideApp.with(context) .load(ColorDrawable(ThemeUtils.getColor(context, android.R.attr.colorBackground))) - .placeholder(binding.locationLiveMessageBannerBackground.drawable) + .placeholder(binding.locationLiveRunningBannerBackground.drawable) .transform(GranularRoundedCorners(0f, 0f, viewState.bottomEndCornerRadiusInDp, viewState.bottomStartCornerRadiusInDp)) .into(background) } @@ -109,14 +109,14 @@ class LocationLiveRunningBannerView @JvmOverloads constructor( if (viewState.isStopButtonCenteredVertically) { constraintSet.connect( - R.id.locationLiveMessageBannerStop, + R.id.locationLiveRunningBannerStop, ConstraintSet.BOTTOM, - R.id.locationLiveMessageBannerBackground, + R.id.locationLiveRunningBannerBackground, ConstraintSet.BOTTOM, 0 ) } else { - constraintSet.clear(R.id.locationLiveMessageBannerStop, ConstraintSet.BOTTOM) + constraintSet.clear(R.id.locationLiveRunningBannerStop, ConstraintSet.BOTTOM) } constraintSet.applyTo(parentLayout) diff --git a/vector/src/main/res/layout/item_timeline_event_location_stub.xml b/vector/src/main/res/layout/item_timeline_event_location_stub.xml index 54de86e57f..3875a25773 100644 --- a/vector/src/main/res/layout/item_timeline_event_location_stub.xml +++ b/vector/src/main/res/layout/item_timeline_event_location_stub.xml @@ -46,7 +46,7 @@ tools:visibility="visible" />