mirror of
https://github.com/mihonapp/mihon.git
synced 2026-10-19 07:02:20 -07:00
Fix library search when clicking source name in manga info screen (#4002)
This commit is contained in:
@@ -30,6 +30,7 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
|
||||
- Fixed MangaBaka scores being wrong when score step size was set to > 1 ([@MajorTanya](https://github.com/MajorTanya)) ([#3740](https://github.com/mihonapp/mihon/pull/3740))
|
||||
- Fixed default category and manga sometimes not getting their category set when restoring a backup ([@Secozzi](https://github.com/Secozzi)) ([#3891](https://github.com/mihonapp/mihon/pull/3891))
|
||||
- Fixed AniList rate limit ([@MajorTanya](https://github.com/MajorTanya)) ([#3942](https://github.com/mihonapp/mihon/pull/3942))
|
||||
- Fixed library search when clicking source name in manga info screen ([@choppeh](https://github.com/choppeh)) ([#4002](https://github.com/mihonapp/mihon/pull/4002))
|
||||
|
||||
## [v0.20.4] - 2026-08-05
|
||||
### Fixed
|
||||
|
||||
@@ -378,7 +378,7 @@ private fun MangaScreenSmallImpl(
|
||||
isTabletUi = false,
|
||||
appBarPadding = topPadding,
|
||||
manga = state.manga,
|
||||
sourceName = remember { state.source.getNameForMangaInfo() },
|
||||
source = remember { state.source },
|
||||
isStubSource = remember { state.source is StubSource },
|
||||
onCoverClick = onCoverClicked,
|
||||
doSearch = onSearch,
|
||||
@@ -614,7 +614,7 @@ fun MangaScreenLargeImpl(
|
||||
isTabletUi = true,
|
||||
appBarPadding = contentPadding.calculateTopPadding(),
|
||||
manga = state.manga,
|
||||
sourceName = remember { state.source.getNameForMangaInfo() },
|
||||
source = remember { state.source },
|
||||
isStubSource = remember { state.source is StubSource },
|
||||
onCoverClick = onCoverClicked,
|
||||
doSearch = onSearch,
|
||||
|
||||
@@ -72,6 +72,8 @@ import com.mikepenz.markdown.model.markdownAnnotatorConfig
|
||||
import com.mikepenz.markdown.utils.getUnescapedTextInNode
|
||||
import eu.kanade.presentation.components.DropdownMenu
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.source.Source
|
||||
import eu.kanade.tachiyomi.source.getNameForMangaInfo
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import eu.kanade.tachiyomi.util.system.copyToClipboard
|
||||
import kotlinx.datetime.TimeZone
|
||||
@@ -114,7 +116,7 @@ fun MangaInfoBox(
|
||||
isTabletUi: Boolean,
|
||||
appBarPadding: Dp,
|
||||
manga: Manga,
|
||||
sourceName: String,
|
||||
source: Source,
|
||||
isStubSource: Boolean,
|
||||
onCoverClick: () -> Unit,
|
||||
doSearch: (query: String, global: Boolean) -> Unit,
|
||||
@@ -151,7 +153,7 @@ fun MangaInfoBox(
|
||||
MangaAndSourceTitlesSmall(
|
||||
appBarPadding = appBarPadding,
|
||||
manga = manga,
|
||||
sourceName = sourceName,
|
||||
source = source,
|
||||
isStubSource = isStubSource,
|
||||
onCoverClick = onCoverClick,
|
||||
doSearch = doSearch,
|
||||
@@ -160,7 +162,7 @@ fun MangaInfoBox(
|
||||
MangaAndSourceTitlesLarge(
|
||||
appBarPadding = appBarPadding,
|
||||
manga = manga,
|
||||
sourceName = sourceName,
|
||||
source = source,
|
||||
isStubSource = isStubSource,
|
||||
onCoverClick = onCoverClick,
|
||||
doSearch = doSearch,
|
||||
@@ -344,7 +346,7 @@ fun ExpandableMangaDescription(
|
||||
private fun MangaAndSourceTitlesLarge(
|
||||
appBarPadding: Dp,
|
||||
manga: Manga,
|
||||
sourceName: String,
|
||||
source: Source,
|
||||
isStubSource: Boolean,
|
||||
onCoverClick: () -> Unit,
|
||||
doSearch: (query: String, global: Boolean) -> Unit,
|
||||
@@ -370,7 +372,7 @@ private fun MangaAndSourceTitlesLarge(
|
||||
author = manga.author,
|
||||
artist = manga.artist,
|
||||
status = manga.status,
|
||||
sourceName = sourceName,
|
||||
source = source,
|
||||
isStubSource = isStubSource,
|
||||
doSearch = doSearch,
|
||||
textAlign = TextAlign.Center,
|
||||
@@ -382,7 +384,7 @@ private fun MangaAndSourceTitlesLarge(
|
||||
private fun MangaAndSourceTitlesSmall(
|
||||
appBarPadding: Dp,
|
||||
manga: Manga,
|
||||
sourceName: String,
|
||||
source: Source,
|
||||
isStubSource: Boolean,
|
||||
onCoverClick: () -> Unit,
|
||||
doSearch: (query: String, global: Boolean) -> Unit,
|
||||
@@ -413,7 +415,7 @@ private fun MangaAndSourceTitlesSmall(
|
||||
author = manga.author,
|
||||
artist = manga.artist,
|
||||
status = manga.status,
|
||||
sourceName = sourceName,
|
||||
source = source,
|
||||
isStubSource = isStubSource,
|
||||
doSearch = doSearch,
|
||||
)
|
||||
@@ -427,7 +429,7 @@ private fun ColumnScope.MangaContentInfo(
|
||||
author: String?,
|
||||
artist: String?,
|
||||
status: Long,
|
||||
sourceName: String,
|
||||
source: Source,
|
||||
isStubSource: Boolean,
|
||||
doSearch: (query: String, global: Boolean) -> Unit,
|
||||
textAlign: TextAlign? = LocalTextStyle.current.textAlign,
|
||||
@@ -553,12 +555,9 @@ private fun ColumnScope.MangaContentInfo(
|
||||
)
|
||||
}
|
||||
Text(
|
||||
text = sourceName,
|
||||
text = source.getNameForMangaInfo(),
|
||||
modifier = Modifier.clickableNoIndication {
|
||||
doSearch(
|
||||
sourceName,
|
||||
false,
|
||||
)
|
||||
doSearch(source.query(), false)
|
||||
},
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
maxLines = 1,
|
||||
@@ -567,6 +566,8 @@ private fun ColumnScope.MangaContentInfo(
|
||||
}
|
||||
}
|
||||
|
||||
private fun Source.query(): String = """src:"$name" lang:$lang""".takeIf { name.isNotBlank() } ?: "srcid:$id"
|
||||
|
||||
@Composable
|
||||
private fun descriptionAnnotator(loadImages: Boolean, linkStyle: SpanStyle) = remember(loadImages, linkStyle) {
|
||||
markdownAnnotator(
|
||||
|
||||
Reference in New Issue
Block a user