Use method references in `WidgetTorchConfigureActivity`

This commit is contained in:
Ensar Sarajčić 2023-10-05 13:34:15 +02:00
parent 6372066b8e
commit 8ea675a743
1 changed files with 3 additions and 9 deletions

View File

@ -48,15 +48,9 @@ class WidgetTorchConfigureActivity : ComponentActivity() {
widgetDrawable = R.drawable.ic_flashlight_vector,
widgetColor = widgetColor,
widgetAlpha = widgetAlpha,
onSliderChanged = {
viewModel.changeAlpha(it)
},
onColorPressed = {
pickBackgroundColor()
},
onSavePressed = {
saveConfig()
}
onSliderChanged = viewModel::changeAlpha,
onColorPressed = ::pickBackgroundColor,
onSavePressed = ::saveConfig
)
}
}