From c590bbdb9b08a64c93a0578f8f7796d836a43523 Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Thu, 3 Feb 2022 12:53:59 +0300 Subject: [PATCH] Code review fixes. --- .../detail/timeline/action/MessageActionsEpoxyController.kt | 3 ++- .../java/im/vector/app/features/location/LocationDataTest.kt | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/MessageActionsEpoxyController.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/MessageActionsEpoxyController.kt index 578e6ef10d..27937047a5 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/MessageActionsEpoxyController.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/MessageActionsEpoxyController.kt @@ -45,6 +45,7 @@ import im.vector.app.features.location.toLocationData import im.vector.app.features.media.ImageContentRenderer import im.vector.lib.core.utils.epoxy.charsequence.toEpoxyCharSequence import org.matrix.android.sdk.api.extensions.orFalse +import org.matrix.android.sdk.api.extensions.orTrue import org.matrix.android.sdk.api.failure.Failure import org.matrix.android.sdk.api.session.events.model.toModel import org.matrix.android.sdk.api.session.room.model.message.MessageLocationContent @@ -82,7 +83,7 @@ class MessageActionsEpoxyController @Inject constructor( ?.toModel(catchError = true) val locationUrl = locationContent?.toLocationData() ?.let { urlMapProvider.buildStaticMapUrl(it, INITIAL_MAP_ZOOM_IN_TIMELINE, 1200, 800) } - val locationOwnerId = if (locationContent?.isSelfLocation().orFalse()) state.informationData.matrixItem.id else null + val locationOwnerId = if (locationContent?.isSelfLocation().orTrue()) state.informationData.matrixItem.id else null bottomSheetMessagePreviewItem { id("preview") diff --git a/vector/src/test/java/im/vector/app/features/location/LocationDataTest.kt b/vector/src/test/java/im/vector/app/features/location/LocationDataTest.kt index 2a6f68da02..e273c0b3c9 100644 --- a/vector/src/test/java/im/vector/app/features/location/LocationDataTest.kt +++ b/vector/src/test/java/im/vector/app/features/location/LocationDataTest.kt @@ -17,7 +17,6 @@ package im.vector.app.features.location import org.amshove.kluent.shouldBeEqualTo -import org.amshove.kluent.shouldBeFalse import org.amshove.kluent.shouldBeNull import org.amshove.kluent.shouldBeTrue import org.junit.Test