mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-18 00:57:02 +05:30
LobstersItem: extract hard-coded submitter text
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
a7bd050013
commit
33b238c646
2 changed files with 3 additions and 1 deletions
|
@ -16,6 +16,7 @@ import androidx.compose.material.ripple.rememberRipple
|
|||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
@ -109,7 +110,7 @@ fun LobstersItem(
|
|||
},
|
||||
)
|
||||
Text(
|
||||
text = "submitted by ${post.submitterUser.username}",
|
||||
text = stringResource(id = R.string.submitted_by, post.submitterUser.username),
|
||||
modifier = Modifier
|
||||
.padding(4.dp)
|
||||
.constrainAs(submitter) {
|
||||
|
|
|
@ -4,4 +4,5 @@
|
|||
<string name="no_saved_posts">You don\'t have any saved posts</string>
|
||||
<string name="hottest_posts">Hottest</string>
|
||||
<string name="saved_posts">Saved</string>
|
||||
<string name="submitted_by">submitted by %1$s</string>
|
||||
</resources>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue