mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 19:10:43 +00:00
-5
@@ -119,7 +119,6 @@ private fun RoomListModalBottomSheetContent(
|
|||||||
leadingContent = ListItemContent.Icon(
|
leadingContent = ListItemContent.Icon(
|
||||||
iconSource = IconSource.Vector(CompoundIcons.MarkAsRead())
|
iconSource = IconSource.Vector(CompoundIcons.MarkAsRead())
|
||||||
),
|
),
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
ListItem(
|
ListItem(
|
||||||
@@ -133,7 +132,6 @@ private fun RoomListModalBottomSheetContent(
|
|||||||
leadingContent = ListItemContent.Icon(
|
leadingContent = ListItemContent.Icon(
|
||||||
iconSource = IconSource.Vector(CompoundIcons.MarkAsUnread())
|
iconSource = IconSource.Vector(CompoundIcons.MarkAsUnread())
|
||||||
),
|
),
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
val (textResId, icon) = if (contextMenu.isFavorite) {
|
val (textResId, icon) = if (contextMenu.isFavorite) {
|
||||||
@@ -159,7 +157,6 @@ private fun RoomListModalBottomSheetContent(
|
|||||||
onClick = {
|
onClick = {
|
||||||
onFavoriteChange(!contextMenu.isFavorite)
|
onFavoriteChange(!contextMenu.isFavorite)
|
||||||
},
|
},
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
)
|
)
|
||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = {
|
headlineContent = {
|
||||||
@@ -174,7 +171,6 @@ private fun RoomListModalBottomSheetContent(
|
|||||||
CompoundIcons.Settings(),
|
CompoundIcons.Settings(),
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
)
|
)
|
||||||
if (canReportRoom) {
|
if (canReportRoom) {
|
||||||
ListItem(
|
ListItem(
|
||||||
@@ -211,7 +207,6 @@ private fun RoomListModalBottomSheetContent(
|
|||||||
leadingContent = ListItemContent.Icon(
|
leadingContent = ListItemContent.Icon(
|
||||||
iconSource = IconSource.Vector(CompoundIcons.Delete())
|
iconSource = IconSource.Vector(CompoundIcons.Delete())
|
||||||
),
|
),
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -249,7 +249,7 @@ private fun ActionListViewContent(
|
|||||||
leadingContent = ListItemContent.Icon(IconSource.Resource(action.icon)),
|
leadingContent = ListItemContent.Icon(IconSource.Resource(action.icon)),
|
||||||
style = when {
|
style = when {
|
||||||
action.destructive -> ListItemStyle.Destructive
|
action.destructive -> ListItemStyle.Destructive
|
||||||
else -> ListItemStyle.Primary
|
else -> ListItemStyle.Default
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
-8
@@ -34,7 +34,6 @@ import io.element.android.libraries.designsystem.preview.ElementPreview
|
|||||||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||||
import io.element.android.libraries.designsystem.theme.components.IconSource
|
import io.element.android.libraries.designsystem.theme.components.IconSource
|
||||||
import io.element.android.libraries.designsystem.theme.components.ListItem
|
import io.element.android.libraries.designsystem.theme.components.ListItem
|
||||||
import io.element.android.libraries.designsystem.theme.components.ListItemStyle
|
|
||||||
import io.element.android.libraries.designsystem.theme.components.ModalBottomSheet
|
import io.element.android.libraries.designsystem.theme.components.ModalBottomSheet
|
||||||
import io.element.android.libraries.designsystem.theme.components.Text
|
import io.element.android.libraries.designsystem.theme.components.Text
|
||||||
|
|
||||||
@@ -106,25 +105,21 @@ private fun AttachmentSourcePickerMenu(
|
|||||||
modifier = Modifier.clickable { state.eventSink(MessageComposerEvent.PickAttachmentSource.PhotoFromCamera) },
|
modifier = Modifier.clickable { state.eventSink(MessageComposerEvent.PickAttachmentSource.PhotoFromCamera) },
|
||||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.TakePhoto())),
|
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.TakePhoto())),
|
||||||
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_camera_photo)) },
|
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_camera_photo)) },
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
)
|
)
|
||||||
ListItem(
|
ListItem(
|
||||||
modifier = Modifier.clickable { state.eventSink(MessageComposerEvent.PickAttachmentSource.VideoFromCamera) },
|
modifier = Modifier.clickable { state.eventSink(MessageComposerEvent.PickAttachmentSource.VideoFromCamera) },
|
||||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.VideoCall())),
|
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.VideoCall())),
|
||||||
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_camera_video)) },
|
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_camera_video)) },
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
)
|
)
|
||||||
ListItem(
|
ListItem(
|
||||||
modifier = Modifier.clickable { state.eventSink(MessageComposerEvent.PickAttachmentSource.FromGallery) },
|
modifier = Modifier.clickable { state.eventSink(MessageComposerEvent.PickAttachmentSource.FromGallery) },
|
||||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Image())),
|
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Image())),
|
||||||
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_gallery)) },
|
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_gallery)) },
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
)
|
)
|
||||||
ListItem(
|
ListItem(
|
||||||
modifier = Modifier.clickable { state.eventSink(MessageComposerEvent.PickAttachmentSource.FromFiles) },
|
modifier = Modifier.clickable { state.eventSink(MessageComposerEvent.PickAttachmentSource.FromFiles) },
|
||||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Attachment())),
|
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Attachment())),
|
||||||
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_files)) },
|
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_files)) },
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
)
|
)
|
||||||
if (state.canShareLocation) {
|
if (state.canShareLocation) {
|
||||||
ListItem(
|
ListItem(
|
||||||
@@ -134,7 +129,6 @@ private fun AttachmentSourcePickerMenu(
|
|||||||
},
|
},
|
||||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.LocationPin())),
|
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.LocationPin())),
|
||||||
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_location)) },
|
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_location)) },
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
ListItem(
|
ListItem(
|
||||||
@@ -144,14 +138,12 @@ private fun AttachmentSourcePickerMenu(
|
|||||||
},
|
},
|
||||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Polls())),
|
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Polls())),
|
||||||
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_poll)) },
|
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_poll)) },
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
)
|
)
|
||||||
if (enableTextFormatting) {
|
if (enableTextFormatting) {
|
||||||
ListItem(
|
ListItem(
|
||||||
modifier = Modifier.clickable { state.eventSink(MessageComposerEvent.ToggleTextFormatting(enabled = true)) },
|
modifier = Modifier.clickable { state.eventSink(MessageComposerEvent.ToggleTextFormatting(enabled = true)) },
|
||||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.TextFormatting())),
|
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.TextFormatting())),
|
||||||
headlineContent = { Text(stringResource(R.string.screen_room_attachment_text_formatting)) },
|
headlineContent = { Text(stringResource(R.string.screen_room_attachment_text_formatting)) },
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
-1
@@ -181,7 +181,6 @@ private fun ChangeOwnRoleBottomSheet(
|
|||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = { Text(stringResource(CommonStrings.action_cancel)) },
|
headlineContent = { Text(stringResource(CommonStrings.action_cancel)) },
|
||||||
onClick = ::dismiss,
|
onClick = ::dismiss,
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
-1
@@ -278,7 +278,6 @@ private fun RoomMemberActionsBottomSheet(
|
|||||||
when (val action = actionState.action) {
|
when (val action = actionState.action) {
|
||||||
is ModerationAction.DisplayProfile -> {
|
is ModerationAction.DisplayProfile -> {
|
||||||
ListItem(
|
ListItem(
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
headlineContent = { Text(stringResource(R.string.screen_bottom_sheet_manage_room_member_member_user_info)) },
|
headlineContent = { Text(stringResource(R.string.screen_bottom_sheet_manage_room_member_member_user_info)) },
|
||||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.UserProfile())),
|
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.UserProfile())),
|
||||||
onClick = {
|
onClick = {
|
||||||
|
|||||||
-1
@@ -84,7 +84,6 @@ private fun PreferenceBlockUser(
|
|||||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Block())),
|
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Block())),
|
||||||
onClick = { if (!isLoading) eventSink(UserProfileEvents.UnblockUser(needsConfirmation = true)) },
|
onClick = { if (!isLoading) eventSink(UserProfileEvents.UnblockUser(needsConfirmation = true)) },
|
||||||
trailingContent = if (isLoading) ListItemContent.Custom(loadingCurrentValue) else null,
|
trailingContent = if (isLoading) ListItemContent.Custom(loadingCurrentValue) else null,
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
ListItem(
|
ListItem(
|
||||||
|
|||||||
+1
-1
@@ -104,7 +104,7 @@ private fun AvatarActionBottomSheetContent(
|
|||||||
leadingContent = ListItemContent.Icon(IconSource.Resource(action.iconResourceId)),
|
leadingContent = ListItemContent.Icon(IconSource.Resource(action.iconResourceId)),
|
||||||
style = when {
|
style = when {
|
||||||
action.destructive -> ListItemStyle.Destructive
|
action.destructive -> ListItemStyle.Destructive
|
||||||
else -> ListItemStyle.Primary
|
else -> ListItemStyle.Default
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
-5
@@ -105,7 +105,6 @@ fun MediaDetailsBottomSheet(
|
|||||||
ListItem(
|
ListItem(
|
||||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.VisibilityOn())),
|
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.VisibilityOn())),
|
||||||
headlineContent = { Text(stringResource(CommonStrings.action_view_in_timeline)) },
|
headlineContent = { Text(stringResource(CommonStrings.action_view_in_timeline)) },
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
onClick = {
|
onClick = {
|
||||||
onViewInTimeline(state.eventId)
|
onViewInTimeline(state.eventId)
|
||||||
}
|
}
|
||||||
@@ -113,7 +112,6 @@ fun MediaDetailsBottomSheet(
|
|||||||
ListItem(
|
ListItem(
|
||||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.ShareAndroid())),
|
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.ShareAndroid())),
|
||||||
headlineContent = { Text(stringResource(CommonStrings.action_share)) },
|
headlineContent = { Text(stringResource(CommonStrings.action_share)) },
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
onClick = {
|
onClick = {
|
||||||
onShare(state.eventId)
|
onShare(state.eventId)
|
||||||
}
|
}
|
||||||
@@ -121,7 +119,6 @@ fun MediaDetailsBottomSheet(
|
|||||||
ListItem(
|
ListItem(
|
||||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Forward())),
|
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Forward())),
|
||||||
headlineContent = { Text(stringResource(CommonStrings.action_forward)) },
|
headlineContent = { Text(stringResource(CommonStrings.action_forward)) },
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
onClick = {
|
onClick = {
|
||||||
onForward(state.eventId)
|
onForward(state.eventId)
|
||||||
}
|
}
|
||||||
@@ -129,7 +126,6 @@ fun MediaDetailsBottomSheet(
|
|||||||
ListItem(
|
ListItem(
|
||||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Download())),
|
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Download())),
|
||||||
headlineContent = { Text(stringResource(CommonStrings.action_download)) },
|
headlineContent = { Text(stringResource(CommonStrings.action_download)) },
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
onClick = {
|
onClick = {
|
||||||
onDownload(state.eventId)
|
onDownload(state.eventId)
|
||||||
}
|
}
|
||||||
@@ -148,7 +144,6 @@ fun MediaDetailsBottomSheet(
|
|||||||
ListItem(
|
ListItem(
|
||||||
leadingContent = icon,
|
leadingContent = icon,
|
||||||
headlineContent = { Text(wording) },
|
headlineContent = { Text(wording) },
|
||||||
style = ListItemStyle.Primary,
|
|
||||||
onClick = {
|
onClick = {
|
||||||
onOpenWith(state.eventId)
|
onOpenWith(state.eventId)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user