feat: show libraryColored by default on all list/grid

This commit is contained in:
Cuong-Tran 2024-07-22 11:36:49 +07:00 committed by Tran M. Cuong
parent 4c4c6ae292
commit afbb4b70b1
4 changed files with 9 additions and 18 deletions

View file

@ -81,12 +81,12 @@ fun MangaCompactGridItem(
coverBadgeStart: @Composable (RowScope.() -> Unit)? = null,
coverBadgeEnd: @Composable (RowScope.() -> Unit)? = null,
// KMK -->
libraryColored: Boolean? = null,
libraryColored: Boolean = true,
// KMK <--
) {
// KMK -->
val bgColor = libraryColored?.let { coverData.dominantCoverColors?.first?.let { Color(it) } }
val onBgColor = libraryColored?.let { coverData.dominantCoverColors?.second }
val bgColor = coverData.dominantCoverColors?.first?.let { Color(it) }.takeIf { libraryColored }
val onBgColor = coverData.dominantCoverColors?.second.takeIf { libraryColored }
// KMK <--
GridItemSelectable(
isSelected = isSelected,
@ -212,12 +212,12 @@ fun MangaComfortableGridItem(
coverBadgeEnd: (@Composable RowScope.() -> Unit)? = null,
onClickContinueReading: (() -> Unit)? = null,
// KMK -->
libraryColored: Boolean? = null,
libraryColored: Boolean = true,
// KMK <--
) {
// KMK -->
val bgColor = libraryColored?.let { coverData.dominantCoverColors?.first?.let { Color(it) } }
val onBgColor = libraryColored?.let { coverData.dominantCoverColors?.second }
val bgColor = coverData.dominantCoverColors?.first?.let { Color(it) }.takeIf { libraryColored }
val onBgColor = coverData.dominantCoverColors?.second.takeIf { libraryColored }
// KMK <--
GridItemSelectable(
isSelected = isSelected,
@ -390,12 +390,12 @@ fun MangaListItem(
coverAlpha: Float = 1f,
onClickContinueReading: (() -> Unit)? = null,
// KMK -->
libraryColored: Boolean? = null,
libraryColored: Boolean = true,
// KMK <--
) {
// KMK -->
val bgColor = libraryColored?.let { coverData.dominantCoverColors?.first?.let { Color(it) } }
val onBgColor = libraryColored?.let { coverData.dominantCoverColors?.second }
val bgColor = coverData.dominantCoverColors?.first?.let { Color(it) }.takeIf { libraryColored }
val onBgColor = coverData.dominantCoverColors?.second.takeIf { libraryColored }
// KMK <--
Row(
modifier = Modifier

View file

@ -61,9 +61,6 @@ internal fun LibraryComfortableGrid(
} else {
null
},
// KMK -->
libraryColored = true,
// KMK <--
)
}
}

View file

@ -62,9 +62,6 @@ internal fun LibraryCompactGrid(
} else {
null
},
// KMK -->
libraryColored = true,
// KMK <--
)
}
}

View file

@ -69,9 +69,6 @@ internal fun LibraryList(
} else {
null
},
// KMK -->
libraryColored = true,
// KMK <--
)
}
}