mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 00:35:26 +02:00
Fix cursor position in converter
This commit is contained in:
parent
0bb260e921
commit
06c9224cbb
@ -63,7 +63,11 @@ internal class ConverterViewModel @Inject constructor(
|
||||
) : ViewModel() {
|
||||
|
||||
private val converterInputKey = "CONVERTER_INPUT"
|
||||
private val _input = MutableStateFlow(TextFieldValue(savedStateHandle[converterInputKey] ?: ""))
|
||||
private val _input = MutableStateFlow(
|
||||
with(savedStateHandle[converterInputKey] ?: "") {
|
||||
TextFieldValue(this, TextRange(this.length))
|
||||
}
|
||||
)
|
||||
private val _calculation = MutableStateFlow<BigDecimal?>(null)
|
||||
private val _result = MutableStateFlow<ConverterResult>(ConverterResult.Loading)
|
||||
private val _unitFrom = MutableStateFlow<AbstractUnit?>(null)
|
||||
|
Loading…
x
Reference in New Issue
Block a user