Navigate from people view to configuration view

This commit is contained in:
Florian Renaud 2023-04-03 09:28:24 +02:00
parent 018a5c540a
commit 1c6e088d5c
14 changed files with 306 additions and 9 deletions

View file

@ -16,16 +16,19 @@
package io.element.android.libraries.matrix.ui.model
import android.os.Parcelable
import androidx.compose.runtime.Immutable
import io.element.android.libraries.designsystem.components.avatar.AvatarData
import io.element.android.libraries.matrix.api.core.UserId
import kotlinx.parcelize.Parcelize
@Parcelize
@Immutable
data class MatrixUser(
val id: UserId,
val username: String? = null,
val avatarData: AvatarData = AvatarData(id.value, username),
)
) : Parcelable
fun MatrixUser.getBestName(): String {
return username?.takeIf { it.isNotEmpty() } ?: id.value