Annotate IntentData and AmberBunkerRequest with @Immutable

Tells the Compose compiler these data classes are stable so that
composables receiving List<IntentData> or List<AmberBunkerRequest>
can be skipped during recomposition when the list reference hasn't
changed, avoiding the 'unstable parameter' performance warning.

https://claude.ai/code/session_01PRSKjmFms1Tj1QJ5FhfqZm
This commit is contained in:
Claude
2026-03-20 11:54:22 +00:00
parent 8bee21a281
commit 62fa6eb368
2 changed files with 4 additions and 0 deletions
@@ -1,5 +1,6 @@
package com.greenart7c3.nostrsigner.models
import androidx.compose.runtime.Immutable
import com.vitorpamplona.quartz.nip01Core.core.Event
import com.vitorpamplona.quartz.nip01Core.relay.normalizer.NormalizedRelayUrl
import com.vitorpamplona.quartz.nip46RemoteSigner.BunkerRequest
@@ -9,6 +10,7 @@ enum class EncryptionType {
NIP04,
}
@Immutable
data class AmberBunkerRequest(
val request: BunkerRequest,
val localKey: String,
@@ -1,8 +1,10 @@
package com.greenart7c3.nostrsigner.models
import androidx.compose.runtime.Immutable
import com.vitorpamplona.quartz.nip01Core.core.Event
import com.vitorpamplona.quartz.nip01Core.core.HexKey
@Immutable
data class IntentData(
val data: String,
val name: String,