Remove default value for lambda.
We enforce a value to be provided and it's better for code code coverage.
This commit is contained in:
@@ -51,9 +51,9 @@ import io.element.android.libraries.ui.strings.CommonStrings
|
||||
@Composable
|
||||
fun RoomNotificationSettingsView(
|
||||
state: RoomNotificationSettingsState,
|
||||
onShowGlobalNotifications: () -> Unit,
|
||||
onBackPressed: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
onShowGlobalNotifications: () -> Unit = {},
|
||||
onBackPressed: () -> Unit = {},
|
||||
) {
|
||||
if (state.showUserDefinedSettingStyle) {
|
||||
UserDefinedRoomNotificationSettingsView(
|
||||
@@ -193,5 +193,9 @@ private fun RoomNotificationSettingsTopBar(
|
||||
internal fun RoomNotificationSettingsPreview(
|
||||
@PreviewParameter(RoomNotificationSettingsStateProvider::class) state: RoomNotificationSettingsState
|
||||
) = ElementPreview {
|
||||
RoomNotificationSettingsView(state)
|
||||
RoomNotificationSettingsView(
|
||||
state = state,
|
||||
onShowGlobalNotifications = {},
|
||||
onBackPressed = {},
|
||||
)
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ import io.element.android.libraries.designsystem.theme.components.TopAppBar
|
||||
@Composable
|
||||
fun UserDefinedRoomNotificationSettingsView(
|
||||
state: RoomNotificationSettingsState,
|
||||
onBackPressed: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
onBackPressed: () -> Unit = {},
|
||||
) {
|
||||
Scaffold(
|
||||
modifier = modifier,
|
||||
@@ -120,5 +120,8 @@ private fun UserDefinedRoomNotificationSettingsTopBar(
|
||||
internal fun UserDefinedRoomNotificationSettingsPreview(
|
||||
@PreviewParameter(UserDefinedRoomNotificationSettingsStateProvider::class) state: RoomNotificationSettingsState
|
||||
) = ElementPreview {
|
||||
UserDefinedRoomNotificationSettingsView(state)
|
||||
UserDefinedRoomNotificationSettingsView(
|
||||
state = state,
|
||||
onBackPressed = {},
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user