Skip to content

Commit a9a83bb

Browse files
committed
Remove unused home lazylist items
1 parent c98fc47 commit a9a83bb

File tree

3 files changed

+0
-96
lines changed

3 files changed

+0
-96
lines changed

Jetcaster/mobile/src/main/java/com/example/jetcaster/ui/home/category/PodcastCategory.kt

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import androidx.compose.foundation.layout.fillMaxSize
2626
import androidx.compose.foundation.layout.fillMaxWidth
2727
import androidx.compose.foundation.layout.padding
2828
import androidx.compose.foundation.layout.width
29-
import androidx.compose.foundation.lazy.LazyListScope
3029
import androidx.compose.foundation.lazy.LazyRow
3130
import androidx.compose.foundation.lazy.grid.LazyGridScope
3231
import androidx.compose.foundation.lazy.grid.items
@@ -54,33 +53,6 @@ import com.example.jetcaster.ui.theme.JetcasterTheme
5453
import com.example.jetcaster.util.ToggleFollowPodcastIconButton
5554
import com.example.jetcaster.util.fullWidthItem
5655

57-
fun LazyListScope.podcastCategory(
58-
podcastCategoryFilterResult: PodcastCategoryFilterResult,
59-
navigateToPodcastDetails: (PodcastInfo) -> Unit,
60-
navigateToPlayer: (EpisodeInfo) -> Unit,
61-
onQueueEpisode: (PlayerEpisode) -> Unit,
62-
onTogglePodcastFollowed: (PodcastInfo) -> Unit,
63-
) {
64-
item {
65-
CategoryPodcasts(
66-
topPodcasts = podcastCategoryFilterResult.topPodcasts,
67-
navigateToPodcastDetails = navigateToPodcastDetails,
68-
onTogglePodcastFollowed = onTogglePodcastFollowed
69-
)
70-
}
71-
72-
val episodes = podcastCategoryFilterResult.episodes
73-
items(episodes, key = { it.episode.uri }) { item ->
74-
EpisodeListItem(
75-
episode = item.episode,
76-
podcast = item.podcast,
77-
onClick = navigateToPlayer,
78-
onQueueEpisode = onQueueEpisode,
79-
modifier = Modifier.fillParentMaxWidth()
80-
)
81-
}
82-
}
83-
8456
fun LazyGridScope.podcastCategory(
8557
podcastCategoryFilterResult: PodcastCategoryFilterResult,
8658
navigateToPodcastDetails: (PodcastInfo) -> Unit,

Jetcaster/mobile/src/main/java/com/example/jetcaster/ui/home/discover/Discover.kt

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import androidx.compose.foundation.layout.Spacer
2121
import androidx.compose.foundation.layout.fillMaxWidth
2222
import androidx.compose.foundation.layout.height
2323
import androidx.compose.foundation.layout.padding
24-
import androidx.compose.foundation.lazy.LazyListScope
2524
import androidx.compose.foundation.lazy.grid.LazyGridScope
2625
import androidx.compose.material.icons.Icons
2726
import androidx.compose.material.icons.filled.Check
@@ -52,41 +51,6 @@ import com.example.jetcaster.designsystem.theme.Keyline1
5251
import com.example.jetcaster.ui.home.category.podcastCategory
5352
import com.example.jetcaster.util.fullWidthItem
5453

55-
fun LazyListScope.discoverItems(
56-
filterableCategoriesModel: FilterableCategoriesModel,
57-
podcastCategoryFilterResult: PodcastCategoryFilterResult,
58-
navigateToPodcastDetails: (PodcastInfo) -> Unit,
59-
navigateToPlayer: (EpisodeInfo) -> Unit,
60-
onCategorySelected: (CategoryInfo) -> Unit,
61-
onTogglePodcastFollowed: (PodcastInfo) -> Unit,
62-
onQueueEpisode: (PlayerEpisode) -> Unit,
63-
) {
64-
if (filterableCategoriesModel.isEmpty) {
65-
// TODO: empty state
66-
return
67-
}
68-
69-
item {
70-
Spacer(Modifier.height(8.dp))
71-
72-
PodcastCategoryTabs(
73-
filterableCategoriesModel = filterableCategoriesModel,
74-
onCategorySelected = onCategorySelected,
75-
modifier = Modifier.fillMaxWidth()
76-
)
77-
78-
Spacer(Modifier.height(8.dp))
79-
}
80-
81-
podcastCategory(
82-
podcastCategoryFilterResult = podcastCategoryFilterResult,
83-
navigateToPodcastDetails = navigateToPodcastDetails,
84-
navigateToPlayer = navigateToPlayer,
85-
onTogglePodcastFollowed = onTogglePodcastFollowed,
86-
onQueueEpisode = onQueueEpisode,
87-
)
88-
}
89-
9054
fun LazyGridScope.discoverItems(
9155
filterableCategoriesModel: FilterableCategoriesModel,
9256
podcastCategoryFilterResult: PodcastCategoryFilterResult,

Jetcaster/mobile/src/main/java/com/example/jetcaster/ui/home/library/Library.kt

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ package com.example.jetcaster.ui.home.library
1818

1919
import androidx.compose.foundation.layout.fillMaxWidth
2020
import androidx.compose.foundation.layout.padding
21-
import androidx.compose.foundation.lazy.LazyListScope
2221
import androidx.compose.foundation.lazy.grid.LazyGridScope
2322
import androidx.compose.foundation.lazy.grid.items
24-
import androidx.compose.foundation.lazy.items
2523
import androidx.compose.material3.MaterialTheme
2624
import androidx.compose.material3.Text
2725
import androidx.compose.ui.Modifier
@@ -35,36 +33,6 @@ import com.example.jetcaster.designsystem.theme.Keyline1
3533
import com.example.jetcaster.ui.shared.EpisodeListItem
3634
import com.example.jetcaster.util.fullWidthItem
3735

38-
fun LazyListScope.libraryItems(
39-
library: LibraryInfo,
40-
navigateToPlayer: (EpisodeInfo) -> Unit,
41-
onQueueEpisode: (PlayerEpisode) -> Unit
42-
) {
43-
item {
44-
Text(
45-
text = stringResource(id = R.string.latest_episodes),
46-
modifier = Modifier.padding(
47-
start = Keyline1,
48-
top = 16.dp,
49-
),
50-
style = MaterialTheme.typography.titleLarge,
51-
)
52-
}
53-
54-
items(
55-
library,
56-
key = { it.episode.uri }
57-
) { item ->
58-
EpisodeListItem(
59-
episode = item.episode,
60-
podcast = item.podcast,
61-
onClick = navigateToPlayer,
62-
onQueueEpisode = onQueueEpisode,
63-
modifier = Modifier.fillParentMaxWidth(),
64-
)
65-
}
66-
}
67-
6836
fun LazyGridScope.libraryItems(
6937
library: LibraryInfo,
7038
navigateToPlayer: (EpisodeInfo) -> Unit,

0 commit comments

Comments
 (0)