mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Make extension isCritical a val instead of a fun.
This commit is contained in:
committed by
Benoit Marty
parent
0661cd2046
commit
3676bca042
+2
-2
@@ -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
|
||||
}
|
||||
|
||||
+1
-1
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user