mirror of
https://github.com/SimpleMobileTools/Simple-Flashlight.git
synced 2025-02-09 16:38:45 +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,
|
||||
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…
x
Reference in New Issue
Block a user