Last active
January 10, 2023 02:51
-
-
Save syntialai/56f7e4657ec010cc116fc9de4cd74dac to your computer and use it in GitHub Desktop.
Instagram home screen (Wrong example)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun HomeScreenWrong(modifier: Modifier = Modifier) { | |
val scrollState = rememberScrollState() | |
val context = LocalContext.current | |
Surface(modifier = modifier.fillMaxWidth()) { | |
Column(modifier = Modifier.verticalScroll(scrollState)) { | |
LazyRow(modifier = modifier.fillMaxWidth()) { | |
items(stories) { story -> | |
StoryThumbnail(story = story) | |
} | |
} | |
LazyColumn(modifier = modifier.fillMaxWidth()) { | |
items(posts) { post -> | |
PostCard( | |
post = safePost, | |
postCardListener = getPostCardListener(context), | |
modifier = Modifier.padding(vertical = 8.dp)) | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment