Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Surface(
- modifier = Modifier.fillMaxWidth()
- ) {
- LazyColumn(
- modifier = Modifier
- .height(650.dp)
- .padding(top = 32.dp)
- .padding(horizontal = 16.dp),
- verticalArrangement = Arrangement.spacedBy(16.dp)
- ) {
- item {
- if (exploreViewModel.isExploreHomeScreen()) {
- ExploreScreenHeader(
- onRefreshButtonClick = { showUpdateDialog = true }
- )
- }
- }
- item {
- SearchSection(exploreViewModel = exploreViewModel)
- }
- item {
- if (exploreViewModel.isExploreHomeScreen()) {
- SearchFilterChips(searchFilterChips = exploreViewModel.uiState.searchFilterChips)
- }
- }
- item {
- if (exploreViewModel.isSearchingScreen()) {
- RecentSearchesSection(exploreViewModel = exploreViewModel)
- }
- }
- items(items = exploreViewModel.uiState.contentToShow, key = { it.id }) {
- if (exploreViewModel.isSearchResultsScreen()) {
- ExploreContentItem(
- content = it,
- onClick = {
- if (it.isLocal == true) {
- // TODO: handle click for local content
- } else {
- remoteContent = it
- showRemoteContentBottomSheet = true
- }
- },
- onClickMore = { sheetData = SheetData(contentData = it) },
- onClickDownload = { downloadRemoteContent(it) })
- }
- if (showRemoteContentBottomSheet && remoteContent != null) {
- RemoteContentBottomSheet(
- content = remoteContent!!,
- onClose = { showRemoteContentBottomSheet = false },
- onClickDownload = {
- downloadRemoteContent(it)
- }
- )
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment