Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fun AnalyticsPreferencesView(
)
Column(modifier) {
ListItem(
headlineContent = {
content = {
Text(stringResource(id = R.string.screen_analytics_settings_share_data))
},
supportingContent = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ private fun RoomJoinRuleOptions(
backgroundTint = Color.Transparent,
)
},
headlineContent = {
content = {
val title = when (item) {
JoinRuleItem.PublicVisibility.Public -> stringResource(R.string.screen_create_room_room_access_section_public_option_title)
is JoinRuleItem.PrivateVisibility.Restricted -> stringResource(R.string.screen_create_room_room_access_section_restricted_option_title)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ internal fun SelectParentSpaceOptions(
modifier = modifier
) {
ListItem(
headlineContent = {
content = {
Text(
text = selectedSpace?.displayName
?: stringResource(R.string.screen_create_room_space_selection_no_space_title),
Expand Down Expand Up @@ -126,7 +126,7 @@ private fun SelectParentSpaceBottomSheet(
LazyColumn(modifier = Modifier.fillMaxWidth()) {
item {
ListItem(
headlineContent = {
content = {
Text(
text = stringResource(R.string.screen_create_room_space_selection_no_space_option),
maxLines = 1
Expand All @@ -141,7 +141,7 @@ private fun SelectParentSpaceBottomSheet(
for (space in spaces) {
item {
ListItem(
headlineContent = {
content = {
Text(
text = space.displayName,
maxLines = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private fun RoomListModalBottomSheetContent(
.verticalScroll(rememberScrollState())
) {
ListItem(
headlineContent = {
content = {
Text(
text = contextMenu.roomName ?: stringResource(id = CommonStrings.common_no_room_name),
style = ElementTheme.typography.fontBodyLgMedium,
Expand All @@ -104,7 +104,7 @@ private fun RoomListModalBottomSheetContent(
)
if (contextMenu.hasNewContent) {
ListItem(
headlineContent = {
content = {
Text(
text = stringResource(id = CommonStrings.action_mark_as_read),
style = MaterialTheme.typography.bodyLarge,
Expand All @@ -117,7 +117,7 @@ private fun RoomListModalBottomSheetContent(
)
} else {
ListItem(
headlineContent = {
content = {
Text(
text = stringResource(id = R.string.screen_roomlist_mark_as_unread),
style = MaterialTheme.typography.bodyLarge,
Expand All @@ -135,7 +135,7 @@ private fun RoomListModalBottomSheetContent(
CommonStrings.common_favourite to CompoundIcons.Favourite()
}
ListItem(
headlineContent = {
content = {
Text(
text = stringResource(id = textResId),
style = MaterialTheme.typography.bodyLarge,
Expand All @@ -154,7 +154,7 @@ private fun RoomListModalBottomSheetContent(
},
)
ListItem(
headlineContent = {
content = {
Text(
text = stringResource(id = CommonStrings.common_settings),
style = MaterialTheme.typography.bodyLarge,
Expand All @@ -169,7 +169,7 @@ private fun RoomListModalBottomSheetContent(
)
if (canReportRoom) {
ListItem(
headlineContent = {
content = {
Text(text = stringResource(CommonStrings.action_report_room))
},
modifier = Modifier.clickable { onReportRoomClick() },
Expand All @@ -182,7 +182,7 @@ private fun RoomListModalBottomSheetContent(
)
}
ListItem(
headlineContent = {
content = {
Text(text = stringResource(CommonStrings.action_leave_room))
},
modifier = Modifier.clickable { onLeaveRoomClick() },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ fun DeclineAndBlockView(
) {
ListItem(
modifier = Modifier.padding(end = 8.dp),
headlineContent = {
content = {
Text(text = stringResource(R.string.screen_decline_and_block_block_user_option_title))
},
supportingContent = {
Expand All @@ -96,7 +96,7 @@ fun DeclineAndBlockView(
Spacer(modifier = Modifier.height(24.dp))
ListItem(
modifier = Modifier.padding(end = 8.dp),
headlineContent = {
content = {
Text(text = stringResource(CommonStrings.action_report_room))
},
supportingContent = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fun DependenciesDetailsView(
}
}
ListItem(
headlineContent = {
content = {
ClickableLinkText(
text = text,
interactionSource = remember { MutableInteractionSource() },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fun DependencyLicensesListView(
}
is AsyncData.Success -> items(state.licenses.data) { license ->
ListItem(
headlineContent = { Text(license.safeName) },
content = { Text(license.safeName) },
supportingContent = {
Text(
buildString {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ private fun ShareCurrentLocationItem(
onClick: () -> Unit,
) {
ListItem(
headlineContent = {
content = {
Text(stringResource(CommonStrings.screen_share_my_location_action))
},
onClick = onClick,
Expand All @@ -276,7 +276,7 @@ private fun SharePinLocationItem(
onClick: () -> Unit,
) {
ListItem(
headlineContent = {
content = {
Text(stringResource(CommonStrings.screen_share_this_location_action))
},
onClick = onClick,
Expand All @@ -291,7 +291,7 @@ private fun ShareLiveLocationItem(
onClick: () -> Unit,
) {
ListItem(
headlineContent = {
content = {
Text(stringResource(CommonStrings.action_share_live_location))
},
onClick = onClick,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ fun LockScreenSettingsView(
) {
PreferenceCategory(showTopDivider = false) {
ListItem(
headlineContent = {
content = {
Text(stringResource(id = R.string.screen_app_lock_settings_change_pin))
},
onClick = onChangePinClick,
)
PreferenceDivider()
if (state.showRemovePinOption) {
ListItem(
headlineContent = {
content = {
Text(stringResource(id = R.string.screen_app_lock_settings_remove_pin))
},
style = ListItemStyle.Destructive,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ private fun ActionListViewContent(
modifier = Modifier.clickable {
onActionClick(action)
},
headlineContent = {
content = {
Text(text = stringResource(id = action.titleRes))
},
leadingContent = ListItemContent.Icon(IconSource.Resource(action.icon)),
Expand Down Expand Up @@ -461,7 +461,7 @@ private fun VerifiedUserSendFailureView(
.padding(horizontal = 16.dp, vertical = 8.dp),
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.ErrorSolid())),
trailingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.ChevronRight())),
headlineContent = {
content = {
Text(
text = sendFailure.headline(),
style = ElementTheme.typography.fontBodySmMedium,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ private fun VideoQualitySelectorDialog(
val estimationMb = sizeFormatter.format(videoEstimation.sizeInBytes, true)
val title = "${preset.title()} ($estimationMb)"
ListItem(
headlineContent = {
content = {
Text(
text = title,
style = ElementTheme.typography.fontBodyLgMedium,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,22 +106,22 @@ private fun AttachmentSourcePickerMenu(
ListItem(
modifier = Modifier.clickable { state.eventSink(MessageComposerEvent.PickAttachmentSource.PhotoFromCamera) },
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.TakePhoto())),
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_camera_photo)) },
content = { Text(stringResource(R.string.screen_room_attachment_source_camera_photo)) },
)
ListItem(
modifier = Modifier.clickable { state.eventSink(MessageComposerEvent.PickAttachmentSource.VideoFromCamera) },
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.VideoCall())),
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_camera_video)) },
content = { Text(stringResource(R.string.screen_room_attachment_source_camera_video)) },
)
ListItem(
modifier = Modifier.clickable { state.eventSink(MessageComposerEvent.PickAttachmentSource.FromGallery) },
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Image())),
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_gallery)) },
content = { Text(stringResource(R.string.screen_room_attachment_source_gallery)) },
)
ListItem(
modifier = Modifier.clickable { state.eventSink(MessageComposerEvent.PickAttachmentSource.FromFiles) },
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Attachment())),
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_files)) },
content = { Text(stringResource(R.string.screen_room_attachment_source_files)) },
)
if (state.canShareLocation) {
ListItem(
Expand All @@ -130,7 +130,7 @@ private fun AttachmentSourcePickerMenu(
onSendLocationClick()
},
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.LocationPin())),
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_location)) },
content = { Text(stringResource(R.string.screen_room_attachment_source_location)) },
)
}
ListItem(
Expand All @@ -139,13 +139,13 @@ private fun AttachmentSourcePickerMenu(
onCreatePollClick()
},
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Polls())),
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_poll)) },
content = { Text(stringResource(R.string.screen_room_attachment_source_poll)) },
)
if (enableTextFormatting) {
ListItem(
modifier = Modifier.clickable { state.eventSink(MessageComposerEvent.ToggleTextFormatting(enabled = true)) },
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.TextFormatting())),
headlineContent = { Text(stringResource(R.string.screen_room_attachment_text_formatting)) },
content = { Text(stringResource(R.string.screen_room_attachment_text_formatting)) },
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private fun ReadReceiptBottomSheetContent(
LazyColumn {
item {
ListItem(
headlineContent = {
content = {
Text(text = stringResource(id = CommonStrings.common_seen_by))
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ fun CreatePollView(
item {
Column {
ListItem(
headlineContent = {
content = {
TextField(
label = stringResource(id = R.string.screen_create_poll_question_desc),
value = state.question,
Expand All @@ -127,7 +127,7 @@ fun CreatePollView(
itemsIndexed(state.answers) { index, answer ->
val isLastItem = index == state.answers.size - 1
ListItem(
headlineContent = {
content = {
TextField(
value = answer.text,
onValueChange = {
Expand Down Expand Up @@ -155,7 +155,7 @@ fun CreatePollView(
if (state.canAddAnswer) {
item {
ListItem(
headlineContent = { Text(text = stringResource(id = R.string.screen_create_poll_add_option_btn)) },
content = { Text(text = stringResource(id = R.string.screen_create_poll_add_option_btn)) },
leadingContent = ListItemContent.Icon(
iconSource = IconSource.Vector(CompoundIcons.Plus()),
),
Expand All @@ -174,7 +174,7 @@ fun CreatePollView(
Column {
HorizontalDivider()
ListItem(
headlineContent = { Text(text = stringResource(id = R.string.screen_create_poll_anonymous_headline)) },
content = { Text(text = stringResource(id = R.string.screen_create_poll_anonymous_headline)) },
supportingContent = { Text(text = stringResource(id = R.string.screen_create_poll_anonymous_desc)) },
trailingContent = ListItemContent.Switch(
checked = state.pollKind == PollKind.Undisclosed,
Expand All @@ -189,7 +189,7 @@ fun CreatePollView(
)
if (state.canDelete) {
ListItem(
headlineContent = { Text(text = stringResource(id = CommonStrings.action_delete_poll)) },
content = { Text(text = stringResource(id = CommonStrings.action_delete_poll)) },
style = ListItemStyle.Destructive,
onClick = { state.eventSink(CreatePollEvent.Delete(confirmed = false)) },
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ fun AboutView(
) {
state.elementLegals.forEach { elementLegal ->
ListItem(
headlineContent = {
content = {
Text(stringResource(id = elementLegal.titleRes))
},
onClick = { onElementLegalClick(elementLegal) }
)
}
ListItem(
headlineContent = {
content = {
Text(stringResource(id = CommonStrings.common_open_source_licenses))
},
onClick = onOpenSourceLicensesClick,
Expand Down
Loading