Skip to content

Commit b4bb0e8

Browse files
style: Optimize top/end spacing of pinned message and update colors
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
1 parent 2e5478e commit b4bb0e8

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

app/src/main/java/com/nextcloud/talk/ui/PinnedMessage.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ import java.time.ZoneId
5959
import java.time.format.DateTimeFormatter
6060

6161
const val SPACE_16 = 16
62+
const val SPACE_0 = 0
6263
const val CORNER_RADIUS = 16
6364
val ELEVATION = 2.dp
6465
const val MAX_HEIGHT = 100
@@ -131,7 +132,7 @@ fun PinnedMessageView(
131132
incomingBubbleColor,
132133
RoundedCornerShape(CORNER_RADIUS.dp)
133134
)
134-
.padding(SPACE_16.dp)
135+
.padding(SPACE_16.dp, SPACE_0.dp, SPACE_0.dp, SPACE_16.dp)
135136
.heightIn(max = MAX_HEIGHT.dp)
136137
.clickable(
137138
interactionSource = interactionSource,
@@ -164,23 +165,24 @@ fun PinnedMessageView(
164165
Column(
165166
modifier = Modifier
166167
.verticalScroll(scrollState)
167-
.padding(end = 40.dp)
168+
.padding(top = SPACE_16.dp, end = 40.dp)
168169
) {
169170
Text(
170171
text = pinnedHeadline,
171-
color = MaterialTheme.colorScheme.onSurfaceVariant,
172+
color = colorScheme.onSurfaceVariant,
172173
style = MaterialTheme.typography.labelMedium
173174
)
174175
Spacer(modifier = Modifier.height(4.dp))
175176
Text(
176177
text = message.text,
177-
color = MaterialTheme.colorScheme.onSurface
178+
color = colorScheme.onSurface
178179
)
179180
}
180181

181182
Box(
182183
modifier = Modifier
183184
.align(Alignment.TopEnd)
185+
.padding(top = 2.dp)
184186
) {
185187
IconButton(onClick = { expanded = true }) {
186188
Icon(

0 commit comments

Comments
 (0)