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,15 +16,20 @@
package io.element.android.libraries.designsystem.components.avatar
import android.os.Parcelable
import androidx.compose.runtime.Immutable
import kotlinx.parcelize.IgnoredOnParcel
import kotlinx.parcelize.Parcelize
@Immutable
@Parcelize
data class AvatarData(
val id: String,
val name: String?,
val url: String? = null,
@IgnoredOnParcel
val size: AvatarSize = AvatarSize.MEDIUM
) {
) : Parcelable {
fun getInitial(): String {
val firstChar = name?.firstOrNull() ?: id.getOrNull(1) ?: '?'
return firstChar.uppercase()