mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Fix performance issue reported by Konsist test Sealed interface used in Composable MUST be Immutable or Stable
This commit is contained in:
committed by
Benoit Marty
parent
b994a1ea91
commit
7348f74702
+4
@@ -16,6 +16,7 @@
|
||||
|
||||
package io.element.android.features.messages.impl.attachments.preview
|
||||
|
||||
import androidx.compose.runtime.Immutable
|
||||
import io.element.android.features.messages.impl.attachments.Attachment
|
||||
|
||||
data class AttachmentsPreviewState(
|
||||
@@ -24,8 +25,11 @@ data class AttachmentsPreviewState(
|
||||
val eventSink: (AttachmentsPreviewEvents) -> Unit
|
||||
)
|
||||
|
||||
@Immutable
|
||||
sealed interface SendActionState {
|
||||
data object Idle : SendActionState
|
||||
|
||||
@Immutable
|
||||
sealed interface Sending : SendActionState {
|
||||
data object Processing : Sending
|
||||
data class Uploading(val progress: Float) : Sending
|
||||
|
||||
+2
@@ -16,8 +16,10 @@
|
||||
|
||||
package io.element.android.features.messages.impl.sender
|
||||
|
||||
import androidx.compose.runtime.Immutable
|
||||
import androidx.compose.ui.graphics.Color
|
||||
|
||||
@Immutable
|
||||
sealed interface SenderNameMode {
|
||||
data class Timeline(val mainColor: Color) : SenderNameMode
|
||||
data object Reply : SenderNameMode
|
||||
|
||||
Reference in New Issue
Block a user