feature (room upgrade) : start rendering SuccessorRoom and PredecessorRoom banners in timeline
This commit is contained in:
parent
76e1ec05ba
commit
7b75a52ca2
24 changed files with 255 additions and 89 deletions
|
|
@ -39,7 +39,7 @@ import io.element.android.libraries.ui.strings.CommonStrings
|
|||
|
||||
@Composable
|
||||
fun ComposerAlertMolecule(
|
||||
avatar: AvatarData,
|
||||
avatar: AvatarData?,
|
||||
content: AnnotatedString,
|
||||
onSubmitClick: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
|
|
@ -71,9 +71,9 @@ fun ComposerAlertMolecule(
|
|||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(16.dp)
|
||||
) {
|
||||
Avatar(
|
||||
avatarData = avatar,
|
||||
)
|
||||
if(avatar != null) {
|
||||
Avatar(avatarData = avatar)
|
||||
}
|
||||
Text(
|
||||
text = content,
|
||||
modifier = Modifier.weight(1f),
|
||||
|
|
@ -101,7 +101,7 @@ fun ComposerAlertMolecule(
|
|||
@Composable
|
||||
internal fun ComposerAlertMoleculePreview(@PreviewParameter(BooleanProvider::class) isCritical: Boolean) = ElementPreview {
|
||||
ComposerAlertMolecule(
|
||||
avatar = anAvatarData(size = AvatarSize.ComposerAlert),
|
||||
avatar = null,
|
||||
content = "Alice’s verified identity has changed. Learn more".toAnnotatedString(),
|
||||
isCritical = isCritical,
|
||||
onSubmitClick = {},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue