Code review fixes.

This commit is contained in:
Onuray Sahin 2022-02-03 12:53:59 +03:00
parent c2daab4211
commit c590bbdb9b
2 changed files with 2 additions and 2 deletions

View File

@ -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<MessageLocationContent>(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")

View File

@ -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