mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 08:04:45 +00:00
fix: extract MintPickerItem to fix Kotlin compiler OOM in MintPicker
The deeply-nested Text() call inside DropdownMenu > forEach > DropdownMenuItem generated bytecode with MAXSTACK=26, which caused java.lang.OutOfMemoryError in the JVM bytecode frame analyzer (ConstantConditionEliminationMethodTransformer). Extracting DropdownMenuItem into a top-level private composable breaks the lambda nesting depth and lets the compiler succeed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SqmiRNcMEync2rVVbrPzWt
This commit is contained in:
+15
-7
@@ -1234,17 +1234,25 @@ private fun MintPicker(
|
||||
}
|
||||
DropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) {
|
||||
mints.forEach { m ->
|
||||
DropdownMenuItem(
|
||||
text = { Text(m) },
|
||||
onClick = {
|
||||
onPick(m)
|
||||
expanded = false
|
||||
},
|
||||
)
|
||||
MintPickerItem(m) {
|
||||
onPick(m)
|
||||
expanded = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun MintPickerItem(
|
||||
mint: String,
|
||||
onClick: () -> Unit,
|
||||
) {
|
||||
DropdownMenuItem(
|
||||
text = { Text(mint) },
|
||||
onClick = onClick,
|
||||
)
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Send LN (melt)
|
||||
// ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user