@@ -101,15 +101,9 @@ fun SettingsScreenRoot(
|
|||||||
onDispose { viewModel.cancelTextFieldFlowCollection() }
|
onDispose { viewModel.cancelTextFieldFlowCollection() }
|
||||||
}
|
}
|
||||||
|
|
||||||
val focusTimeInputFieldState = rememberSaveable(saver = TextFieldState.Saver) {
|
val focusTimeInputFieldState = viewModel.focusTimeTextFieldState
|
||||||
viewModel.focusTimeTextFieldState
|
val shortBreakTimeInputFieldState = viewModel.shortBreakTimeTextFieldState
|
||||||
}
|
val longBreakTimeInputFieldState = viewModel.longBreakTimeTextFieldState
|
||||||
val shortBreakTimeInputFieldState = rememberSaveable(saver = TextFieldState.Saver) {
|
|
||||||
viewModel.shortBreakTimeTextFieldState
|
|
||||||
}
|
|
||||||
val longBreakTimeInputFieldState = rememberSaveable(saver = TextFieldState.Saver) {
|
|
||||||
viewModel.longBreakTimeTextFieldState
|
|
||||||
}
|
|
||||||
|
|
||||||
val isPlus by viewModel.isPlus.collectAsStateWithLifecycle()
|
val isPlus by viewModel.isPlus.collectAsStateWithLifecycle()
|
||||||
val alarmEnabled by viewModel.alarmEnabled.collectAsStateWithLifecycle(true)
|
val alarmEnabled by viewModel.alarmEnabled.collectAsStateWithLifecycle(true)
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ fun MinuteInputField(
|
|||||||
state = state,
|
state = state,
|
||||||
lineLimits = TextFieldLineLimits.SingleLine,
|
lineLimits = TextFieldLineLimits.SingleLine,
|
||||||
inputTransformation = MinutesInputTransformation,
|
inputTransformation = MinutesInputTransformation,
|
||||||
outputTransformation = MinutesOutputTransformation,
|
// outputTransformation = MinutesOutputTransformation,
|
||||||
keyboardOptions = KeyboardOptions(
|
keyboardOptions = KeyboardOptions(
|
||||||
keyboardType = KeyboardType.NumberPassword,
|
keyboardType = KeyboardType.NumberPassword,
|
||||||
imeAction = imeAction
|
imeAction = imeAction
|
||||||
|
|||||||
@@ -18,9 +18,7 @@
|
|||||||
package org.nsh07.pomodoro.ui.settingsScreen.components
|
package org.nsh07.pomodoro.ui.settingsScreen.components
|
||||||
|
|
||||||
import androidx.compose.foundation.text.input.InputTransformation
|
import androidx.compose.foundation.text.input.InputTransformation
|
||||||
import androidx.compose.foundation.text.input.OutputTransformation
|
|
||||||
import androidx.compose.foundation.text.input.TextFieldBuffer
|
import androidx.compose.foundation.text.input.TextFieldBuffer
|
||||||
import androidx.compose.foundation.text.input.insert
|
|
||||||
import androidx.core.text.isDigitsOnly
|
import androidx.core.text.isDigitsOnly
|
||||||
|
|
||||||
object MinutesInputTransformation : InputTransformation {
|
object MinutesInputTransformation : InputTransformation {
|
||||||
@@ -31,11 +29,11 @@ object MinutesInputTransformation : InputTransformation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
object MinutesOutputTransformation : OutputTransformation {
|
//object MinutesOutputTransformation : OutputTransformation {
|
||||||
override fun TextFieldBuffer.transformOutput() {
|
// override fun TextFieldBuffer.transformOutput() {
|
||||||
when (this.length) {
|
// when (this.length) {
|
||||||
0 -> insert(0, "00")
|
// 0 -> insert(0, "00")
|
||||||
1 -> insert(0, "0")
|
// 1 -> insert(0, "0")
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
@@ -2,17 +2,17 @@
|
|||||||
activityCompose = "1.11.0"
|
activityCompose = "1.11.0"
|
||||||
adaptive = "1.2.0"
|
adaptive = "1.2.0"
|
||||||
agp = "8.11.2"
|
agp = "8.11.2"
|
||||||
composeBom = "2025.10.01"
|
composeBom = "2025.11.00"
|
||||||
coreKtx = "1.17.0"
|
coreKtx = "1.17.0"
|
||||||
espressoCore = "3.7.0"
|
espressoCore = "3.7.0"
|
||||||
junit = "4.13.2"
|
junit = "4.13.2"
|
||||||
junitVersion = "1.3.0"
|
junitVersion = "1.3.0"
|
||||||
kotlin = "2.2.21"
|
kotlin = "2.2.21"
|
||||||
ksp = "2.2.20-2.0.4"
|
ksp = "2.3.1"
|
||||||
lifecycleRuntimeKtx = "2.9.4"
|
lifecycleRuntimeKtx = "2.9.4"
|
||||||
materialKolor = "3.0.1"
|
materialKolor = "4.0.3"
|
||||||
navigation3 = "1.0.0-beta01"
|
navigation3 = "1.0.0-rc01"
|
||||||
revenuecat = "9.12.0"
|
revenuecat = "9.12.1"
|
||||||
room = "2.8.3"
|
room = "2.8.3"
|
||||||
vico = "2.2.1"
|
vico = "2.2.1"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user