Make sure we can display both Live and Static locations in ShowLocation
This commit is contained in:
@@ -15,8 +15,7 @@ import io.element.android.libraries.architecture.NodeInputs
|
||||
|
||||
interface ShowLocationEntryPoint : FeatureEntryPoint {
|
||||
data class Inputs(
|
||||
val location: Location,
|
||||
val description: String?,
|
||||
val mode: ShowLocationMode,
|
||||
) : NodeInputs
|
||||
|
||||
fun createNode(
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2025 Element Creations Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.features.location.api
|
||||
|
||||
import android.os.Parcelable
|
||||
import io.element.android.libraries.matrix.api.core.UserId
|
||||
import io.element.android.libraries.matrix.api.room.location.AssetType
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
sealed interface ShowLocationMode : Parcelable {
|
||||
@Parcelize
|
||||
data class Static(
|
||||
val location: Location,
|
||||
val senderName: String,
|
||||
val senderId: UserId,
|
||||
val senderAvatarUrl: String?,
|
||||
val timestamp: Long,
|
||||
val assetType: AssetType?,
|
||||
) : ShowLocationMode
|
||||
|
||||
@Parcelize
|
||||
data object Live : ShowLocationMode
|
||||
}
|
||||
Reference in New Issue
Block a user