Lambda parameters in a composable function should be in present tense, not past tense.
https://mrmans0n.github.io/compose-rules/rules/#naming-parameters-properly
This commit is contained in:
parent
0ba5537082
commit
37d9a9f5a9
250 changed files with 1698 additions and 1698 deletions
|
|
@ -34,18 +34,18 @@ class WelcomeNode @AssistedInject constructor(
|
|||
private val buildMeta: BuildMeta,
|
||||
) : Node(buildContext, plugins = plugins) {
|
||||
interface Callback : Plugin {
|
||||
fun onContinueClicked()
|
||||
fun onContinueClick()
|
||||
}
|
||||
|
||||
private fun onContinueClicked() {
|
||||
plugins.filterIsInstance<Callback>().forEach { it.onContinueClicked() }
|
||||
private fun onContinueClick() {
|
||||
plugins.filterIsInstance<Callback>().forEach { it.onContinueClick() }
|
||||
}
|
||||
|
||||
@Composable
|
||||
override fun View(modifier: Modifier) {
|
||||
WelcomeView(
|
||||
applicationName = buildMeta.applicationName,
|
||||
onContinueClicked = ::onContinueClicked,
|
||||
onContinueClick = ::onContinueClick,
|
||||
modifier = modifier
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,9 +52,9 @@ import kotlinx.collections.immutable.persistentListOf
|
|||
fun WelcomeView(
|
||||
applicationName: String,
|
||||
modifier: Modifier = Modifier,
|
||||
onContinueClicked: () -> Unit,
|
||||
onContinueClick: () -> Unit,
|
||||
) {
|
||||
BackHandler(onBack = onContinueClicked)
|
||||
BackHandler(onBack = onContinueClick)
|
||||
OnBoardingPage(
|
||||
modifier = modifier
|
||||
.systemBarsPadding()
|
||||
|
|
@ -90,7 +90,7 @@ fun WelcomeView(
|
|||
Button(
|
||||
text = stringResource(CommonStrings.action_continue),
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
onClick = onContinueClicked
|
||||
onClick = onContinueClick
|
||||
)
|
||||
Spacer(modifier = Modifier.height(32.dp))
|
||||
}
|
||||
|
|
@ -113,6 +113,6 @@ private fun listItems() = persistentListOf(
|
|||
@Composable
|
||||
internal fun WelcomeViewPreview() {
|
||||
ElementPreview {
|
||||
WelcomeView(applicationName = "Element X", onContinueClicked = {})
|
||||
WelcomeView(applicationName = "Element X", onContinueClick = {})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue