Navigate from people view to configuration view
This commit is contained in:
parent
018a5c540a
commit
1c6e088d5c
14 changed files with 306 additions and 9 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue