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
|
|
@ -47,7 +47,7 @@ import io.element.android.libraries.ui.strings.CommonStrings
|
|||
fun UserProfileView(
|
||||
state: UserProfileState,
|
||||
onShareUser: () -> Unit,
|
||||
onDmStarted: (RoomId) -> Unit,
|
||||
onOpenDm: (RoomId) -> Unit,
|
||||
onStartCall: (RoomId) -> Unit,
|
||||
goBack: () -> Unit,
|
||||
openAvatarPreview: (username: String, url: String) -> Unit,
|
||||
|
|
@ -96,7 +96,7 @@ fun UserProfileView(
|
|||
progressText = stringResource(CommonStrings.common_starting_chat),
|
||||
)
|
||||
},
|
||||
onSuccess = onDmStarted,
|
||||
onSuccess = onOpenDm,
|
||||
errorMessage = { stringResource(R.string.screen_start_chat_error_starting_chat) },
|
||||
onRetry = { state.eventSink(UserProfileEvents.StartDM) },
|
||||
onErrorDismiss = { state.eventSink(UserProfileEvents.ClearStartDMState) },
|
||||
|
|
@ -114,7 +114,7 @@ internal fun UserProfileViewPreview(
|
|||
state = state,
|
||||
onShareUser = {},
|
||||
goBack = {},
|
||||
onDmStarted = {},
|
||||
onOpenDm = {},
|
||||
onStartCall = {},
|
||||
openAvatarPreview = { _, _ -> }
|
||||
)
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ private fun BlockConfirmationDialog(
|
|||
title = stringResource(R.string.screen_dm_details_block_user),
|
||||
content = stringResource(R.string.screen_dm_details_block_alert_description),
|
||||
submitText = stringResource(R.string.screen_dm_details_block_alert_action),
|
||||
onSubmitClicked = onBlockAction,
|
||||
onSubmitClick = onBlockAction,
|
||||
onDismiss = onDismiss
|
||||
)
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ private fun UnblockConfirmationDialog(
|
|||
title = stringResource(R.string.screen_dm_details_unblock_user),
|
||||
content = stringResource(R.string.screen_dm_details_unblock_alert_description),
|
||||
submitText = stringResource(R.string.screen_dm_details_unblock_alert_action),
|
||||
onSubmitClicked = onUnblockAction,
|
||||
onSubmitClick = onUnblockAction,
|
||||
onDismiss = onDismiss
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ private fun <R : TestRule> AndroidComposeTestRule<R, ComponentActivity>.setUserP
|
|||
UserProfileView(
|
||||
state = state,
|
||||
onShareUser = onShareUser,
|
||||
onDmStarted = onDmStarted,
|
||||
onOpenDm = onDmStarted,
|
||||
onStartCall = onStartCall,
|
||||
goBack = goBack,
|
||||
openAvatarPreview = openAvatarPreview,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue