Fix compilation

This commit is contained in:
ganfra 2026-03-09 21:19:29 +01:00
parent 7575d78d86
commit 0056a3f163
3 changed files with 5 additions and 1 deletions

View file

@ -40,6 +40,7 @@ data class TimelineItemLocationContent(
when (assetType) {
AssetType.PIN -> PinVariant.PinnedLocation
AssetType.SENDER,
AssetType.UNKNOWN,
null -> PinVariant.UserLocation(avatarData = senderAvatar(), isLive = false)
}
}

View file

@ -10,5 +10,6 @@ package io.element.android.libraries.matrix.api.room.location
enum class AssetType {
SENDER,
PIN
PIN,
UNKNOWN
}

View file

@ -14,9 +14,11 @@ import org.matrix.rustcomponents.sdk.AssetType as RustAssetType
fun AssetType.into(): RustAssetType = when (this) {
AssetType.SENDER -> RustAssetType.SENDER
AssetType.PIN -> RustAssetType.PIN
AssetType.UNKNOWN -> RustAssetType.UNKNOWN
}
fun RustAssetType.into(): AssetType = when(this){
RustAssetType.SENDER -> AssetType.SENDER
RustAssetType.PIN -> AssetType.PIN
RustAssetType.UNKNOWN -> AssetType.UNKNOWN
}