File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
app/src/main/java/to/bitkit/ui/components Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import androidx.compose.foundation.lazy.grid.items
1212import androidx.compose.material3.Icon
1313import androidx.compose.material3.Text
1414import androidx.compose.runtime.Composable
15- import androidx.compose.runtime.getValue
1615import androidx.compose.ui.Alignment
1716import androidx.compose.ui.Modifier
1817import androidx.compose.ui.hapticfeedback.HapticFeedbackType
@@ -61,10 +60,9 @@ fun NumberPad(
6160 currencies: CurrencyState = LocalCurrencies.current,
6261 type: NumberPadType = viewModel.getNumberPadType(currencies),
6362 availableHeight: Dp? = null,
63+ errorKey: String? = viewModel.uiState.collectAsStateWithLifecycle().value.errorKey,
64+ onPress: (String) -> Unit = { key -> viewModel.handleNumberPadInput(key, currencies) },
6465) {
65- val uiState by viewModel.uiState.collectAsStateWithLifecycle()
66- val errorKey: String? = uiState.errorKey
67- val onPress: (String) -> Unit = { key -> viewModel.handleNumberPadInput(key, currencies) }
6866
6967 BoxWithConstraints(modifier = modifier) {
7068 val constraintsHeight = this.maxHeight
You can’t perform that action at this time.
0 commit comments