UX cleanup: reorder text composer actions (#2847)

* UX cleanup: reorder text composer actions

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
Jorge Martin Espinosa 2024-05-15 10:28:06 +02:00 committed by GitHub
parent 96b627f00a
commit ef38535665
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 17 additions and 16 deletions

1
changelog.d/2803.misc Normal file
View file

@ -0,0 +1 @@
UX cleanup: reorder text composer actions to prioritise camera ones.

View file

@ -106,18 +106,6 @@ private fun AttachmentSourcePickerMenu(
.navigationBarsPadding()
.imePadding()
) {
ListItem(
modifier = Modifier.clickable { state.eventSink(MessageComposerEvents.PickAttachmentSource.FromGallery) },
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Image())),
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_gallery)) },
style = ListItemStyle.Primary,
)
ListItem(
modifier = Modifier.clickable { state.eventSink(MessageComposerEvents.PickAttachmentSource.FromFiles) },
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Attachment())),
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_files)) },
style = ListItemStyle.Primary,
)
ListItem(
modifier = Modifier.clickable { state.eventSink(MessageComposerEvents.PickAttachmentSource.PhotoFromCamera) },
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.TakePhoto())),
@ -130,6 +118,18 @@ private fun AttachmentSourcePickerMenu(
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_camera_video)) },
style = ListItemStyle.Primary,
)
ListItem(
modifier = Modifier.clickable { state.eventSink(MessageComposerEvents.PickAttachmentSource.FromGallery) },
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Image())),
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_gallery)) },
style = ListItemStyle.Primary,
)
ListItem(
modifier = Modifier.clickable { state.eventSink(MessageComposerEvents.PickAttachmentSource.FromFiles) },
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Attachment())),
headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_files)) },
style = ListItemStyle.Primary,
)
if (state.canShareLocation) {
ListItem(
modifier = Modifier.clickable {

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:71231170c8d6cff3137aaa59df68f5d4b186cd501a8195ebff18b78635a36c66
oid sha256:a8775112e8078f699bf9366d8ef3238421527601cb5eb8c8ba946b4c3a22fefb
size 26182

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:44a3bf1e15ca379d471e7a1e531564d585298d8ba1edf82aa064b8512ccf5f22
oid sha256:3934bee2240469aa5dd91cc7654ca012e0aa424a266ad47e09f24ed78d82ec62
size 23845

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5f6f3350f9e409d8a6e87116b5500f519cad1f1d731f03b3674412207c6f4b1e
oid sha256:8ef8c712e3327374c8f186501c7dfd790b57e061b7a6540b7a53baec0e8ff563
size 28044

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e56586426695abaf31a2e5fd3f4367177e69378daa5ed4f8a19ec93f768a60ff
oid sha256:3d912533966c2eca1e1b881247fb9ede01c3f47d79ea238ab4da3ee34e574721
size 24781