Merge pull request #3144 from element-hq/feature/bma/markAsReadIcon

Add icon for "Mark as read" and "Mark as unread" actions.
This commit is contained in:
ganfra 2024-07-05 11:37:11 +02:00 committed by GitHub
commit ddcb17f27e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 53 additions and 54 deletions

View file

@ -96,36 +96,35 @@ private fun RoomListModalBottomSheetContent(
}
)
if (contextMenu.markAsUnreadFeatureFlagEnabled) {
ListItem(
headlineContent = {
Text(
text = stringResource(
id = if (contextMenu.hasNewContent) {
R.string.screen_roomlist_mark_as_read
} else {
R.string.screen_roomlist_mark_as_unread
}
),
style = MaterialTheme.typography.bodyLarge,
)
},
modifier = Modifier.clickable {
if (contextMenu.hasNewContent) {
onRoomMarkReadClick()
} else {
onRoomMarkUnreadClick()
}
},
/* TODO Design
leadingContent = ListItemContent.Icon(
iconSource = IconSource.Vector(
CompoundIcons.Settings,
contentDescription = stringResource(id = CommonStrings.common_settings)
)
),
*/
style = ListItemStyle.Primary,
)
if (contextMenu.hasNewContent) {
ListItem(
headlineContent = {
Text(
text = stringResource(id = R.string.screen_roomlist_mark_as_read),
style = MaterialTheme.typography.bodyLarge,
)
},
onClick = onRoomMarkReadClick,
leadingContent = ListItemContent.Icon(
iconSource = IconSource.Vector(CompoundIcons.MarkAsRead())
),
style = ListItemStyle.Primary,
)
} else {
ListItem(
headlineContent = {
Text(
text = stringResource(id = R.string.screen_roomlist_mark_as_unread),
style = MaterialTheme.typography.bodyLarge,
)
},
onClick = onRoomMarkUnreadClick,
leadingContent = ListItemContent.Icon(
iconSource = IconSource.Vector(CompoundIcons.MarkAsUnread())
),
style = ListItemStyle.Primary,
)
}
}
ListItem(
headlineContent = {

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f7249fe5316ce5b2db50489bef2d2ce95d8328507410548e8f6bcb9b33104d2c
size 18545
oid sha256:87ce5ffee7e77cf6c67fe2918604d901755897739a7aa250adc85f8dca8fa384
size 19027

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bc916f49b9eec8c1da8525ad86a6cb806c8b9fd4af5d18c32691433bb152a11e
size 20350
oid sha256:177ebd3790437dad70044a183be5f109e457e7be2ef297bee9a214f41f136d54
size 20824

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:11a0303a1d1f885db2dbda1a770518602c0ead94baf5500a3c06a4482c095a88
size 20615
oid sha256:bfd039feb28f9322719e4508c8fdc3a723deda4b5ab5f5035b668d764e398e99
size 21087

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:46a75f785463c85ab9a6038669cdd41d64dc043eca222f6029ef3b51bc1014c6
size 17952
oid sha256:5f89e40f49b0d0b9167aad620842f75005c9b37ca52c86bd0c902b79e387bd14
size 18330

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:06c03db06ec5ecb8e66b60beefb8ecc1ebcb820d2aa1dd9ea6dd2e294bc2b62f
size 19654
oid sha256:55c2e188b78a4019955cbf765dde70b771b94972939fe785c4134f6f2cb258b6
size 20042

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:54d7136e55a632186446badaab12be68afb9a062deb8433c5f6f1a0685653097
size 19856
oid sha256:22a0bd0eafdbbaa00b48d120b36cb048dd73b8ddaf39235bb146d79a84898c52
size 20243

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:daae8460b864ca17688a7e01165787f0c2610b82ff5e56645d03a3a32f4dc62d
size 22263
oid sha256:1745dfe97efbb62bc1bcc0a6e019e48e07dbc474396d9d58e11784522e519049
size 22733

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f73427a7770fa810299e156191e475cc70c0d19538dfa9c472f79e30b71230ab
size 22000
oid sha256:50a54a812331ec421e5b111a2aac07e0a75474d750bcd65f78d05c5485b028b1
size 22474

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:84ecc8f273245781423c398495913cb770513d9401e9522d5a58cdf5ec360d26
size 19900
oid sha256:69e7b908f96969480ea4502f54f63f3066f1ef3c67171404f2aec294c25d7e3b
size 20358

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f8405c8fb37bf9021b15e03bf5744d7021ff47d9133e302025b35602c2063f0a
size 20397
oid sha256:0c5474b5be24946927efb2c6bf7a67a5ea378a63e16714ebe0a4cfbf76794bdf
size 20775

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ddfa75b7c5332287cb498d769eee8ede8f234b0347c552c6435aedcfcd626039
size 20170
oid sha256:43d72cf8272c38c6646c19e876f109d3e22f9aa91bd39af9a78bd15cc47bbf82
size 20542

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8e08c05bf0c42b2b546c3dc3a8573f2a3294cf63059c495cf284b7302228b3e7
size 18202
oid sha256:4fc6ca5ca4298f69e1a036c164a9a832ebf9595f6ec92d81243d90ddb1cbc1a6
size 18591