Skip to content

Commit b95e8b3

Browse files
authored
[Jetcaster] Remove unused home lazylist items (#1520)
2 parents 482c117 + 4b7bfeb commit b95e8b3

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.LazyRow
2625
import androidx.compose.foundation.lazy.grid.LazyGridScope
2726
import androidx.compose.foundation.lazy.itemsIndexed
@@ -49,41 +48,6 @@ import com.example.jetcaster.designsystem.theme.Keyline1
4948
import com.example.jetcaster.ui.home.category.podcastCategory
5049
import com.example.jetcaster.util.fullWidthItem
5150

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