mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-18 19:37:02 +05:30
app: remove unnecessary Column from LobstersItem
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
91205a0b2a
commit
52e010d79b
1 changed files with 23 additions and 26 deletions
|
@ -6,7 +6,6 @@ import androidx.compose.foundation.background
|
|||
import androidx.compose.foundation.border
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.lazy.LazyColumnFor
|
||||
|
@ -33,33 +32,31 @@ fun LazyItemScope.LobstersItem(
|
|||
.fillParentMaxWidth()
|
||||
.clickable(onClick = { onClick.invoke(post) }),
|
||||
text = {
|
||||
Column {
|
||||
Text(
|
||||
text = post.title,
|
||||
color = Color(0xFF7395D9),
|
||||
fontWeight = FontWeight.Bold,
|
||||
modifier = Modifier.padding(top = 4.dp)
|
||||
)
|
||||
Row(
|
||||
modifier = Modifier.padding(vertical = 8.dp),
|
||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
||||
) {
|
||||
post.tags.forEach { tag ->
|
||||
Text(
|
||||
text = tag,
|
||||
modifier = Modifier
|
||||
.border(BorderStroke(1.dp, Color.Gray))
|
||||
.background(Color(0xFFFFFCD7), RoundedCornerShape(4.dp))
|
||||
.padding(vertical = 2.dp, horizontal = 4.dp),
|
||||
color = Color.DarkGray,
|
||||
)
|
||||
}
|
||||
Text(
|
||||
text = post.title,
|
||||
color = Color(0xFF7395D9),
|
||||
fontWeight = FontWeight.Bold,
|
||||
modifier = Modifier.padding(top = 4.dp)
|
||||
)
|
||||
Row(
|
||||
modifier = Modifier.padding(vertical = 8.dp),
|
||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
||||
) {
|
||||
post.tags.forEach { tag ->
|
||||
Text(
|
||||
text = tag,
|
||||
modifier = Modifier
|
||||
.border(BorderStroke(1.dp, Color.Gray))
|
||||
.background(Color(0xFFFFFCD7), RoundedCornerShape(4.dp))
|
||||
.padding(vertical = 2.dp, horizontal = 4.dp),
|
||||
color = Color.DarkGray,
|
||||
)
|
||||
}
|
||||
Text(
|
||||
text = "submitted by ${post.submitterUser.username}",
|
||||
modifier = Modifier.padding(bottom = 4.dp),
|
||||
)
|
||||
}
|
||||
Text(
|
||||
text = "submitted by ${post.submitterUser.username}",
|
||||
modifier = Modifier.padding(bottom = 4.dp),
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue