mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Fix PR comments
This commit is contained in:
+18
-16
@@ -150,7 +150,7 @@ fun RoomDetailsView(
|
||||
|
||||
if (state.canShowNotificationSettings && state.roomNotificationSettings != null) {
|
||||
NotificationSection(
|
||||
state = state,
|
||||
isDefaultMode = state.roomNotificationSettings.isDefault,
|
||||
openRoomNotificationSettings = openRoomNotificationSettings)
|
||||
}
|
||||
|
||||
@@ -304,21 +304,23 @@ internal fun TopicSection(
|
||||
}
|
||||
|
||||
@Composable
|
||||
internal fun NotificationSection(state: RoomDetailsState, openRoomNotificationSettings: () -> Unit, modifier: Modifier = Modifier) {
|
||||
state.roomNotificationSettings?.let {
|
||||
val subtitle = if (it.isDefault) {
|
||||
stringResource(R.string.screen_room_details_notification_mode_default)
|
||||
} else {
|
||||
stringResource(R.string.screen_room_details_notification_mode_custom)
|
||||
}
|
||||
PreferenceCategory(modifier = modifier) {
|
||||
PreferenceText(
|
||||
title = stringResource(R.string.screen_room_details_notification_title),
|
||||
subtitle = subtitle,
|
||||
icon = Icons.Outlined.Notifications,
|
||||
onClick = openRoomNotificationSettings,
|
||||
)
|
||||
}
|
||||
internal fun NotificationSection(
|
||||
isDefaultMode: Boolean,
|
||||
openRoomNotificationSettings: () -> Unit,
|
||||
modifier: Modifier = Modifier
|
||||
) {
|
||||
val subtitle = if (isDefaultMode) {
|
||||
stringResource(R.string.screen_room_details_notification_mode_default)
|
||||
} else {
|
||||
stringResource(R.string.screen_room_details_notification_mode_custom)
|
||||
}
|
||||
PreferenceCategory(modifier = modifier) {
|
||||
PreferenceText(
|
||||
title = stringResource(R.string.screen_room_details_notification_title),
|
||||
subtitle = subtitle,
|
||||
icon = Icons.Outlined.Notifications,
|
||||
onClick = openRoomNotificationSettings,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user