mirror of
https://github.com/SimpleMobileTools/Simple-Flashlight.git
synced 2025-02-10 17:00:36 +01:00
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,
|
items = items,
|
||||||
selectedItemId = preferences.lastSleepTimerSeconds,
|
selectedItemId = preferences.lastSleepTimerSeconds,
|
||||||
callback = {
|
callback = {
|
||||||
if (it as Int == -1) {
|
when {
|
||||||
onCustomValueSelected()
|
it == -1 -> onCustomValueSelected()
|
||||||
} else if (it > 0) {
|
it as Int > 0 -> pickedSleepTimer(it)
|
||||||
pickedSleepTimer(it)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user