Replace `else if` with `when` in `MainActivity`
This commit is contained in:
parent
f25601db6b
commit
dabdfdcd7d
|
@ -181,10 +181,9 @@ class MainActivity : ComponentActivity() {
|
|||
items = items,
|
||||
selectedItemId = preferences.lastSleepTimerSeconds,
|
||||
callback = {
|
||||
if (it as Int == -1) {
|
||||
onCustomValueSelected()
|
||||
} else if (it > 0) {
|
||||
pickedSleepTimer(it)
|
||||
when {
|
||||
it == -1 -> onCustomValueSelected()
|
||||
it as Int > 0 -> pickedSleepTimer(it)
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue