Make extension isCritical a val instead of a fun.
This commit is contained in:
parent
0661cd2046
commit
3676bca042
3 changed files with 10 additions and 11 deletions
|
|
@ -65,7 +65,7 @@ internal fun MessageShieldView(
|
|||
|
||||
@Composable
|
||||
internal fun MessageShield.toIconColor(): Color {
|
||||
return when (isCritical()) {
|
||||
return when (isCritical) {
|
||||
true -> ElementTheme.colors.iconCriticalPrimary
|
||||
false -> ElementTheme.colors.iconSecondary
|
||||
}
|
||||
|
|
@ -73,7 +73,7 @@ internal fun MessageShield.toIconColor(): Color {
|
|||
|
||||
@Composable
|
||||
private fun MessageShield.toTextColor(): Color {
|
||||
return when (isCritical()) {
|
||||
return when (isCritical) {
|
||||
true -> ElementTheme.colors.textCriticalPrimary
|
||||
false -> ElementTheme.colors.textSecondary
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ fun TimelineEventTimestampView(
|
|||
) {
|
||||
val formattedTime = event.sentTime
|
||||
val hasUnrecoverableError = event.localSendState is LocalEventSendState.SendingFailed.Unrecoverable
|
||||
val hasEncryptionCritical = event.messageShield?.isCritical().orFalse()
|
||||
val hasEncryptionCritical = event.messageShield?.isCritical.orFalse()
|
||||
val isMessageEdited = event.content.isEdited()
|
||||
val tint = if (hasUnrecoverableError || hasEncryptionCritical) MaterialTheme.colorScheme.error else MaterialTheme.colorScheme.secondary
|
||||
Row(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue