Skip to content

Commit c79a2a0

Browse files
committed
Igualando cores light e dark
1 parent 70431a2 commit c79a2a0

File tree

2 files changed

+23
-15
lines changed
  • core-shared-ui/src/main/java/com/codandotv/streamplayerapp/core_shared_ui/resources
  • feature-list-streams/src/main/java/com/codandotv/streamplayerapp/feature_list_streams/list/presentation

2 files changed

+23
-15
lines changed

core-shared-ui/src/main/java/com/codandotv/streamplayerapp/core_shared_ui/resources/Colors.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,15 @@ import androidx.compose.material3.lightColorScheme
55
import androidx.compose.ui.graphics.Color
66

77
object Colors {
8-
val DarkDeepGray = Color(0xFF262626)
98
val Dark10 = Color(0x1A000000)
109

1110
val LightColors = lightColorScheme(
1211
primary = Color(0xFFE50914),
13-
secondary = Color(0xFFF5F5F1),
1412
background = Color(0xFF000000),
1513
onBackground = Color(0xFFFFFFFF),
1614
surface = Color(0xFF121212),
17-
onSurface = Color(0xFF070707),
18-
onSurfaceVariant = Color(0xFF9B9B9B),
15+
onSurface = Color(0xFFF5F5F1),
16+
onSurfaceVariant = Color(0XFF7b7b7b)
1917
)
2018

2119
val DarkColors = darkColorScheme(

feature-list-streams/src/main/java/com/codandotv/streamplayerapp/feature_list_streams/list/presentation/ListStreamUimodel.kt

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class ListStreamUiModelImpl(
1919
private val resources: Resources
2020
) : ListStreamUimodel {
2121
override fun convertToCardContent(listStream: List<ListStream>): ListStreamsUIState {
22-
val item = listStream.random().streams.random()
2322
return ListStreamsUIState(
2423
isLoading = false,
2524
carousels = listStream.map {
@@ -32,16 +31,27 @@ class ListStreamUiModelImpl(
3231
)
3332
})
3433
},
35-
highlightBanner = HighlightBanner(
36-
name = item.name,
37-
imageUrl = item.posterPathUrl,
38-
contentType = ContentType.getContentName(ContentType.FILM),
39-
contentTypeAsPlural = ContentType.getContentNameAsPlural(ContentType.FILM),
40-
extraInfo = IconAndTextInfo(R.drawable.ic_top_10, R.string.highlight_banner_stream_ranking),
41-
leftButton = IconAndTextInfo(drawable.ic_add, R.string.highlight_banner_add),
42-
centralButton = IconAndTextInfo(drawable.ic_play, R.string.highlight_banner_watch),
43-
rightButton = IconAndTextInfo(drawable.ic_info, R.string.highlight_banner_info),
44-
)
34+
highlightBanner = getHighlightBanner(listStream)
35+
)
36+
}
37+
38+
private fun getHighlightBanner(listStream: List<ListStream>): HighlightBanner? {
39+
if (listStream.isEmpty()) return null
40+
41+
val item = listStream.random().streams.random()
42+
43+
return HighlightBanner(
44+
name = item.name,
45+
imageUrl = item.posterPathUrl,
46+
contentType = ContentType.getContentName(ContentType.FILM),
47+
contentTypeAsPlural = ContentType.getContentNameAsPlural(ContentType.FILM),
48+
extraInfo = IconAndTextInfo(
49+
R.drawable.ic_top_10,
50+
R.string.highlight_banner_stream_ranking
51+
),
52+
leftButton = IconAndTextInfo(drawable.ic_add, R.string.highlight_banner_add),
53+
centralButton = IconAndTextInfo(drawable.ic_play, R.string.highlight_banner_watch),
54+
rightButton = IconAndTextInfo(drawable.ic_info, R.string.highlight_banner_info),
4555
)
4656
}
4757
}

0 commit comments

Comments
 (0)