Skip to content

Commit 48c8bb1

Browse files
committed
Switch from AsyncImage to PodcastImage and remove coil from the dependencies.
1 parent fd94c7b commit 48c8bb1

File tree

3 files changed

+1
-25
lines changed

3 files changed

+1
-25
lines changed

Jetcaster/designsystem/src/main/java/com/example/jetcaster/designsystem/component/PodcastImage.kt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package com.example.jetcaster.designsystem.component
1818

1919
import androidx.compose.foundation.Image
2020
import androidx.compose.foundation.background
21-
import androidx.compose.foundation.isSystemInDarkTheme
2221
import androidx.compose.foundation.layout.Box
2322
import androidx.compose.foundation.layout.fillMaxSize
2423
import androidx.compose.foundation.layout.size
@@ -31,15 +30,12 @@ import androidx.compose.runtime.setValue
3130
import androidx.compose.ui.Alignment
3231
import androidx.compose.ui.Modifier
3332
import androidx.compose.ui.graphics.Brush
34-
import androidx.compose.ui.graphics.Color
3533
import androidx.compose.ui.layout.ContentScale
3634
import androidx.compose.ui.platform.LocalContext
3735
import androidx.compose.ui.unit.dp
3836
import coil.compose.AsyncImagePainter
3937
import coil.compose.rememberAsyncImagePainter
4038
import coil.request.ImageRequest
41-
import com.example.jetcaster.designsystem.theme.surfaceContainerDark
42-
import com.example.jetcaster.designsystem.theme.surfaceContainerLight
4339

4440
@Composable
4541
fun PodcastImage(
@@ -93,14 +89,3 @@ fun PodcastImage(
9389
)
9490
}
9591
}
96-
97-
@Composable
98-
private fun podcastImageBackgroundColor(
99-
isInDarkMode: Boolean = isSystemInDarkTheme()
100-
): Color {
101-
return if (isInDarkMode) {
102-
surfaceContainerDark
103-
} else {
104-
surfaceContainerLight
105-
}
106-
}

Jetcaster/designsystem/src/main/java/com/example/jetcaster/designsystem/component/thumbnailPlaceholder.kt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,9 @@ import androidx.compose.runtime.Composable
2121
import androidx.compose.ui.graphics.Brush
2222
import androidx.compose.ui.graphics.Color
2323
import androidx.compose.ui.graphics.SolidColor
24-
import androidx.compose.ui.graphics.painter.BrushPainter
2524
import com.example.jetcaster.designsystem.theme.surfaceVariantDark
2625
import com.example.jetcaster.designsystem.theme.surfaceVariantLight
2726

28-
@Composable
29-
fun thumbnailPlaceholder(
30-
brush: Brush = thumbnailPlaceholderDefaultBrush()
31-
): BrushPainter {
32-
return BrushPainter(brush)
33-
}
34-
3527
@Composable
3628
internal fun thumbnailPlaceholderDefaultBrush(
3729
color: Color = thumbnailPlaceHolderDefaultColor()

Jetcaster/tv-app/src/main/java/com/example/jetcaster/tv/ui/podcast/PodcastScreenViewModel.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package com.example.jetcaster.tv.ui.podcast
1919
import androidx.lifecycle.SavedStateHandle
2020
import androidx.lifecycle.ViewModel
2121
import androidx.lifecycle.viewModelScope
22-
import com.example.jetcaster.core.data.database.model.Podcast
2322
import com.example.jetcaster.core.data.database.model.asExternalModel
2423
import com.example.jetcaster.core.data.database.model.toPlayerEpisode
2524
import com.example.jetcaster.core.data.repository.EpisodeStore
@@ -30,7 +29,6 @@ import com.example.jetcaster.core.player.EpisodePlayer
3029
import com.example.jetcaster.tv.model.EpisodeList
3130
import com.example.jetcaster.tv.ui.Screen
3231
import dagger.hilt.android.lifecycle.HiltViewModel
33-
import javax.inject.Inject
3432
import kotlinx.coroutines.ExperimentalCoroutinesApi
3533
import kotlinx.coroutines.flow.SharingStarted
3634
import kotlinx.coroutines.flow.combine
@@ -39,6 +37,7 @@ import kotlinx.coroutines.flow.flowOf
3937
import kotlinx.coroutines.flow.map
4038
import kotlinx.coroutines.flow.stateIn
4139
import kotlinx.coroutines.launch
40+
import javax.inject.Inject
4241

4342
@HiltViewModel
4443
class PodcastScreenViewModel @Inject constructor(

0 commit comments

Comments
 (0)