Skip to content

Commit

Permalink
ignore season and language change for scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
DatL4g committed Nov 14, 2023
1 parent 3356319 commit d885f2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fun SeriesScreen(component: SeriesComponent) {
val href by component.href.collectAsStateWithLifecycle()
val dialogState by component.dialog.subscribeAsState()

SchemeTheme.setCommon(href)
SchemeTheme.setCommon(BSUtil.commonSeriesHref(href))
when (calculateWindowSizeClass().widthSizeClass) {
WindowWidthSizeClass.Compact -> CompactScreen(component)
else -> DefaultScreen(component)
Expand Down Expand Up @@ -105,7 +105,7 @@ private fun CompactScreen(component: SeriesComponent) {
contentDescription = title,
contentScale = ContentScale.FillWidth,
)
loadImageScheme(href, resource.value)
loadImageScheme(BSUtil.commonSeriesHref(href), resource.value)
}
}

Expand Down Expand Up @@ -337,7 +337,7 @@ private fun DefaultScreen(component: SeriesComponent) {
contentDescription = title,
contentScale = ContentScale.FillWidth,
)
loadImageScheme(BSUtil.fixSeriesHref(href), resource.value)
loadImageScheme(BSUtil.commonSeriesHref(href), resource.value)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ data object BSUtil {
return rebuildHrefFromData(hrefDataFromHref(normalizeHref(href)))
}

fun commonSeriesHref(href: String): String {
return rebuildHrefFromData(hrefDataFromHref(fixSeriesHref(href)).copy(second = null, third = null))
}

fun hrefDataFromHref(href: String): Triple<String, String?, String?> {
fun getTitle(): String {
val newHref = if (href.startsWith("series/")) {
Expand Down

0 comments on commit d885f2a

Please sign in to comment.