mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Remove default value for lambda.
We enforce a value to be provided and it's better for code coverage.
This commit is contained in:
+3
-1
@@ -38,9 +38,9 @@ import io.element.android.libraries.theme.ElementTheme
|
||||
@Composable
|
||||
fun DefaultNotificationSettingOption(
|
||||
mode: RoomNotificationMode,
|
||||
onOptionSelected: (RoomNotificationMode) -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
isSelected: Boolean = false,
|
||||
onOptionSelected: (RoomNotificationMode) -> Unit = {},
|
||||
) {
|
||||
val subtitle = when(mode) {
|
||||
RoomNotificationMode.ALL_MESSAGES -> stringResource(id = R.string.screen_notification_settings_edit_mode_all_messages)
|
||||
@@ -86,10 +86,12 @@ internal fun DefaultNotificationSettingOptionPreview() = ElementPreview {
|
||||
DefaultNotificationSettingOption(
|
||||
mode = RoomNotificationMode.ALL_MESSAGES,
|
||||
isSelected = true,
|
||||
onOptionSelected = {},
|
||||
)
|
||||
DefaultNotificationSettingOption(
|
||||
mode = RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY,
|
||||
isSelected = false,
|
||||
onOptionSelected = {},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user