Fix manga info header using wrong text color (fixes #7368)
(cherry picked from commit 37fe25ac06ff58d9d91f619bfb13cd516b369a90) # Conflicts: # app/src/main/java/eu/kanade/presentation/manga/components/MangaInfoHeader.kt
This commit is contained in:
parent
3fa1c24f8d
commit
24252c388a
@ -123,7 +123,6 @@ private fun ScaffoldLayout(
|
|||||||
snackbar: @Composable () -> Unit,
|
snackbar: @Composable () -> Unit,
|
||||||
fab: @Composable () -> Unit,
|
fab: @Composable () -> Unit,
|
||||||
bottomBar: @Composable () -> Unit,
|
bottomBar: @Composable () -> Unit,
|
||||||
|
|
||||||
) {
|
) {
|
||||||
SubcomposeLayout { constraints ->
|
SubcomposeLayout { constraints ->
|
||||||
val layoutWidth = constraints.maxWidth
|
val layoutWidth = constraints.maxWidth
|
||||||
|
@ -36,11 +36,13 @@ import androidx.compose.material.icons.filled.Sync
|
|||||||
import androidx.compose.material.icons.filled.Warning
|
import androidx.compose.material.icons.filled.Warning
|
||||||
import androidx.compose.material.icons.outlined.CallMerge
|
import androidx.compose.material.icons.outlined.CallMerge
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
|
import androidx.compose.material3.LocalContentColor
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.material3.ProvideTextStyle
|
import androidx.compose.material3.ProvideTextStyle
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.material3.windowsizeclass.WindowWidthSizeClass
|
import androidx.compose.material3.windowsizeclass.WindowWidthSizeClass
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.runtime.CompositionLocalProvider
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
@ -133,34 +135,36 @@ fun MangaInfoHeader(
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Manga & source info
|
// Manga & source info
|
||||||
if (windowWidthSizeClass == WindowWidthSizeClass.Compact) {
|
CompositionLocalProvider(LocalContentColor provides MaterialTheme.colorScheme.onSurface) {
|
||||||
MangaAndSourceTitlesSmall(
|
if (windowWidthSizeClass == WindowWidthSizeClass.Compact) {
|
||||||
appBarPadding = appBarPadding,
|
MangaAndSourceTitlesSmall(
|
||||||
coverDataProvider = coverDataProvider,
|
appBarPadding = appBarPadding,
|
||||||
onCoverClick = onCoverClick,
|
coverDataProvider = coverDataProvider,
|
||||||
title = title,
|
onCoverClick = onCoverClick,
|
||||||
context = context,
|
title = title,
|
||||||
doSearch = doSearch,
|
context = context,
|
||||||
author = author,
|
doSearch = doSearch,
|
||||||
artist = artist,
|
author = author,
|
||||||
status = status,
|
artist = artist,
|
||||||
sourceName = sourceName,
|
status = status,
|
||||||
isStubSource = isStubSource,
|
sourceName = sourceName,
|
||||||
)
|
isStubSource = isStubSource,
|
||||||
} else {
|
)
|
||||||
MangaAndSourceTitlesLarge(
|
} else {
|
||||||
appBarPadding = appBarPadding,
|
MangaAndSourceTitlesLarge(
|
||||||
coverDataProvider = coverDataProvider,
|
appBarPadding = appBarPadding,
|
||||||
onCoverClick = onCoverClick,
|
coverDataProvider = coverDataProvider,
|
||||||
title = title,
|
onCoverClick = onCoverClick,
|
||||||
context = context,
|
title = title,
|
||||||
doSearch = doSearch,
|
context = context,
|
||||||
author = author,
|
doSearch = doSearch,
|
||||||
artist = artist,
|
author = author,
|
||||||
status = status,
|
artist = artist,
|
||||||
sourceName = sourceName,
|
status = status,
|
||||||
isStubSource = isStubSource,
|
sourceName = sourceName,
|
||||||
)
|
isStubSource = isStubSource,
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -441,13 +445,19 @@ private fun MangaAndSourceTitlesSmall(
|
|||||||
text = title.ifBlank { stringResource(R.string.unknown) },
|
text = title.ifBlank { stringResource(R.string.unknown) },
|
||||||
style = MaterialTheme.typography.titleLarge,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
modifier = Modifier.clickableNoIndication(
|
modifier = Modifier.clickableNoIndication(
|
||||||
onLongClick = { if (title.isNotBlank()) context.copyToClipboard(title, title) },
|
onLongClick = {
|
||||||
|
if (title.isNotBlank()) context.copyToClipboard(
|
||||||
|
title,
|
||||||
|
title,
|
||||||
|
)
|
||||||
|
},
|
||||||
onClick = { if (title.isNotBlank()) doSearch(title, true) },
|
onClick = { if (title.isNotBlank()) doSearch(title, true) },
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(2.dp))
|
Spacer(modifier = Modifier.height(2.dp))
|
||||||
Text(
|
Text(
|
||||||
text = author?.takeIf { it.isNotBlank() } ?: stringResource(R.string.unknown_author),
|
text = author?.takeIf { it.isNotBlank() }
|
||||||
|
?: stringResource(R.string.unknown_author),
|
||||||
style = MaterialTheme.typography.titleSmall,
|
style = MaterialTheme.typography.titleSmall,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.secondaryItemAlpha()
|
.secondaryItemAlpha()
|
||||||
@ -520,7 +530,12 @@ private fun MangaAndSourceTitlesSmall(
|
|||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = sourceName,
|
text = sourceName,
|
||||||
modifier = Modifier.clickableNoIndication { doSearch(sourceName, false) },
|
modifier = Modifier.clickableNoIndication {
|
||||||
|
doSearch(
|
||||||
|
sourceName,
|
||||||
|
false,
|
||||||
|
)
|
||||||
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user