Style: Update icons for message status and actions
This commit updates the icons used to indicate a message's status and within the message context menu. The outlined "star" and "edit" icons have been replaced with their filled variants for better visual distinction. Key changes: - Replaced `ic_star_round_24` with `ic_star_fill_round_24` for "important" messages in `DateStatus` and the "Mark as Important" action. - Replaced `ic_edit_round_24` with `ic_edit_fill_round_24` for "edited" messages in `DateStatus`. - Added the new `ic_edit_fill_round_24` drawable resource. - In `MessageBubble`, the `derivedStateOf` for `shouldFill` is now wrapped in a `remember` block to prevent unnecessary recompositions.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:pathData="M160,840Q143,840 131.5,828.5Q120,817 120,800L120,703Q120,687 126,672.5Q132,658 143,647L648,143Q660,132 674.5,126Q689,120 705,120Q721,120 736,126Q751,132 762,144L817,200Q829,211 834.5,226Q840,241 840,256Q840,272 834.5,286.5Q829,301 817,313L313,817Q302,828 287.5,834Q273,840 257,840L160,840ZM704,312L760,256L704,200L648,256L704,312Z"/>
|
||||
</vector>
|
||||
+1
-1
@@ -54,7 +54,7 @@ sealed class MessageOption(
|
||||
|
||||
data object MarkAsImportant : MessageOption(
|
||||
titleResId = R.string.message_context_action_mark_as_important,
|
||||
iconResId = R.drawable.ic_star_round_24
|
||||
iconResId = R.drawable.ic_star_fill_round_24
|
||||
)
|
||||
|
||||
data object UnmarkAsImportant : MessageOption(
|
||||
|
||||
+2
-2
@@ -45,7 +45,7 @@ fun BoxScope.DateStatus(
|
||||
if (isImportant) {
|
||||
Spacer(modifier = Modifier.width(4.dp))
|
||||
Icon(
|
||||
painter = painterResource(R.drawable.ic_star_round_24),
|
||||
painter = painterResource(R.drawable.ic_star_fill_round_24),
|
||||
contentDescription = null,
|
||||
modifier = Modifier.size(14.dp)
|
||||
)
|
||||
@@ -64,7 +64,7 @@ fun BoxScope.DateStatus(
|
||||
if (isEdited) {
|
||||
Spacer(modifier = Modifier.width(4.dp))
|
||||
Icon(
|
||||
painter = painterResource(R.drawable.ic_edit_round_24),
|
||||
painter = painterResource(R.drawable.ic_edit_fill_round_24),
|
||||
contentDescription = null,
|
||||
modifier = Modifier.size(14.dp)
|
||||
)
|
||||
|
||||
+3
-1
@@ -85,9 +85,11 @@ fun MessageBubble(
|
||||
mutableIntStateOf(0)
|
||||
}
|
||||
|
||||
val shouldFill by derivedStateOf {
|
||||
val shouldFill by remember {
|
||||
derivedStateOf {
|
||||
attachmentsContainerWidth >= bubbleContainerWidth
|
||||
}
|
||||
}
|
||||
|
||||
var containerWidth by remember {
|
||||
mutableIntStateOf(0)
|
||||
|
||||
Reference in New Issue
Block a user