diff --git a/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt
index c286c03fe4..ce51c4f1fe 100644
--- a/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt
+++ b/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt
@@ -119,7 +119,7 @@ fun SourcesScreen(
listState = lazyListState,
searchQuery = state.searchQuery,
onChangeSearchQuery = onChangeSearchQuery,
- placeholderText = stringResource(KMR.strings.action_source_search),
+ placeholderText = stringResource(KMR.strings.action_search_for_source),
)
FastScrollLazyColumn(
diff --git a/app/src/main/java/eu/kanade/presentation/manga/MangaScreen.kt b/app/src/main/java/eu/kanade/presentation/manga/MangaScreen.kt
index 1784f29ee4..6d6b89f2d8 100644
--- a/app/src/main/java/eu/kanade/presentation/manga/MangaScreen.kt
+++ b/app/src/main/java/eu/kanade/presentation/manga/MangaScreen.kt
@@ -192,6 +192,7 @@ fun MangaScreen(
onRelatedMangasScreenClick: () -> Unit,
onRelatedMangaClick: (Manga) -> Unit,
onRelatedMangaLongClick: (Manga) -> Unit,
+ librarySearch: (query: String) -> Unit,
onSourceClick: () -> Unit,
onCoverLoaded: (MangaCover) -> Unit,
onPaletteScreenClick: () -> Unit,
@@ -255,6 +256,7 @@ fun MangaScreen(
onRelatedMangasScreenClick = onRelatedMangasScreenClick,
onRelatedMangaClick = onRelatedMangaClick,
onRelatedMangaLongClick = onRelatedMangaLongClick,
+ librarySearch = librarySearch,
onSourceClick = onSourceClick,
onCoverLoaded = onCoverLoaded,
onPaletteScreenClick = onPaletteScreenClick,
@@ -311,6 +313,7 @@ fun MangaScreen(
onRelatedMangasScreenClick = onRelatedMangasScreenClick,
onRelatedMangaClick = onRelatedMangaClick,
onRelatedMangaLongClick = onRelatedMangaLongClick,
+ librarySearch = librarySearch,
onSourceClick = onSourceClick,
onCoverLoaded = onCoverLoaded,
onPaletteScreenClick = onPaletteScreenClick,
@@ -384,6 +387,7 @@ private fun MangaScreenSmallImpl(
onRelatedMangasScreenClick: () -> Unit,
onRelatedMangaClick: (Manga) -> Unit,
onRelatedMangaLongClick: (Manga) -> Unit,
+ librarySearch: (query: String) -> Unit,
onSourceClick: () -> Unit,
onCoverLoaded: (MangaCover) -> Unit,
onPaletteScreenClick: () -> Unit,
@@ -556,6 +560,7 @@ private fun MangaScreenSmallImpl(
onCoverClick = onCoverClicked,
doSearch = onSearch,
// KMK -->
+ librarySearch = librarySearch,
onSourceClick = onSourceClick,
onCoverLoaded = onCoverLoaded,
// KMK <--
@@ -790,6 +795,7 @@ private fun MangaScreenLargeImpl(
onRelatedMangasScreenClick: () -> Unit,
onRelatedMangaClick: (Manga) -> Unit,
onRelatedMangaLongClick: (Manga) -> Unit,
+ librarySearch: (query: String) -> Unit,
onSourceClick: () -> Unit,
onCoverLoaded: (MangaCover) -> Unit,
onPaletteScreenClick: () -> Unit,
@@ -954,6 +960,7 @@ private fun MangaScreenLargeImpl(
onCoverClick = onCoverClicked,
doSearch = onSearch,
// KMK -->
+ librarySearch = librarySearch,
onSourceClick = onSourceClick,
onCoverLoaded = onCoverLoaded,
// KMK <--
diff --git a/app/src/main/java/eu/kanade/presentation/manga/components/MangaInfoHeader.kt b/app/src/main/java/eu/kanade/presentation/manga/components/MangaInfoHeader.kt
index 638492c706..2103a10ffe 100644
--- a/app/src/main/java/eu/kanade/presentation/manga/components/MangaInfoHeader.kt
+++ b/app/src/main/java/eu/kanade/presentation/manga/components/MangaInfoHeader.kt
@@ -80,6 +80,7 @@ import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.util.system.copyToClipboard
import tachiyomi.domain.manga.model.Manga
import tachiyomi.i18n.MR
+import tachiyomi.i18n.kmk.KMR
import tachiyomi.i18n.sy.SYMR
import tachiyomi.presentation.core.components.material.TextButton
import tachiyomi.presentation.core.components.material.padding
@@ -111,6 +112,7 @@ fun MangaInfoBox(
doSearch: (query: String, global: Boolean) -> Unit,
modifier: Modifier = Modifier,
// KMK -->
+ librarySearch: (query: String) -> Unit,
onSourceClick: () -> Unit,
onCoverLoaded: (DomainMangaCover) -> Unit,
// KMK <--
@@ -134,7 +136,7 @@ fun MangaInfoBox(
colors = backdropGradientColors,
// KMK -->
startY = size.height / 2,
- // KMKM <--
+ // KMK <--
),
)
}
@@ -161,6 +163,7 @@ fun MangaInfoBox(
sourceName = sourceName,
isStubSource = isStubSource,
// KMK -->
+ librarySearch = librarySearch,
onSourceClick = onSourceClick,
onCoverLoaded = onCoverLoaded,
// KMK <--
@@ -178,6 +181,7 @@ fun MangaInfoBox(
sourceName = sourceName,
isStubSource = isStubSource,
// KMK -->
+ librarySearch = librarySearch,
onSourceClick = onSourceClick,
onCoverLoaded = onCoverLoaded,
// KMK <--
@@ -429,6 +433,7 @@ private fun MangaAndSourceTitlesLarge(
sourceName: String,
isStubSource: Boolean,
// KMK -->
+ librarySearch: (query: String) -> Unit,
onSourceClick: () -> Unit,
onCoverLoaded: (DomainMangaCover) -> Unit,
// KMK <--
@@ -459,6 +464,7 @@ private fun MangaAndSourceTitlesLarge(
isStubSource = isStubSource,
textAlign = TextAlign.Center,
// KMK -->
+ librarySearch = librarySearch,
onSourceClick = onSourceClick,
// KMK <--
)
@@ -478,6 +484,7 @@ private fun MangaAndSourceTitlesSmall(
sourceName: String,
isStubSource: Boolean,
// KMK -->
+ librarySearch: (query: String) -> Unit,
onSourceClick: () -> Unit,
onCoverLoaded: (DomainMangaCover) -> Unit,
// KMK <--
@@ -512,6 +519,7 @@ private fun MangaAndSourceTitlesSmall(
sourceName = sourceName,
isStubSource = isStubSource,
// KMK -->
+ librarySearch = librarySearch,
onSourceClick = onSourceClick,
// KMK <--
)
@@ -519,6 +527,7 @@ private fun MangaAndSourceTitlesSmall(
}
}
+@Suppress("UnusedReceiverParameter")
@Composable
private fun ColumnScope.MangaContentInfo(
title: String,
@@ -530,20 +539,52 @@ private fun ColumnScope.MangaContentInfo(
isStubSource: Boolean,
textAlign: TextAlign? = LocalTextStyle.current.textAlign,
// KMK -->
+ librarySearch: (query: String) -> Unit,
onSourceClick: () -> Unit,
// KMK <--
) {
val context = LocalContext.current
+ // KMK -->
+ var showMenu by remember { mutableStateOf(false) }
+ DropdownMenu(
+ expanded = showMenu,
+ onDismissRequest = { showMenu = false },
+ ) {
+ DropdownMenuItem(
+ text = { Text(text = stringResource(KMR.strings.action_library_search)) },
+ onClick = {
+ librarySearch(title)
+ showMenu = false
+ },
+ )
+ DropdownMenuItem(
+ text = { Text(text = stringResource(MR.strings.action_global_search)) },
+ onClick = {
+ doSearch(title, true)
+ showMenu = false
+ },
+ )
+ DropdownMenuItem(
+ text = { Text(text = stringResource(MR.strings.action_copy_to_clipboard)) },
+ onClick = {
+ context.copyToClipboard(
+ title,
+ title,
+ )
+ showMenu = false
+ },
+ )
+ }
+ // KMK <--
Text(
text = title.ifBlank { stringResource(MR.strings.unknown_title) },
style = MaterialTheme.typography.titleLarge,
modifier = Modifier.clickableNoIndication(
onLongClick = {
if (title.isNotBlank()) {
- context.copyToClipboard(
- title,
- title,
- )
+ // KMK -->
+ showMenu = true
+ // KMK <--
}
},
onClick = { if (title.isNotBlank()) doSearch(title, true) },
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreen.kt
index 57e67fd037..339d1f88ab 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreen.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreen.kt
@@ -301,6 +301,11 @@ class MangaScreen(
onRefresh = screenModel::fetchAllFromSource,
onContinueReading = { continueReading(context, screenModel.getNextUnreadChapter()) },
onSearch = { query, global -> scope.launch { performSearch(navigator, query, global) } },
+ // KMK -->
+ librarySearch = { query ->
+ scope.launch { performSearch(navigator, query, global = false, library = true) }
+ },
+ // KMK <--
onCoverClicked = screenModel::showCoverDialog,
onShareClicked = { shareManga(context, screenModel.manga, screenModel.source) }.takeIf { isHttpSource },
onDownloadActionClicked = screenModel::runDownloadAction.takeIf { !successState.source.isLocalOrStub() },
@@ -573,7 +578,14 @@ class MangaScreen(
*
* @param query the search query to the parent controller
*/
- private suspend fun performSearch(navigator: Navigator, query: String, global: Boolean) {
+ private suspend fun performSearch(
+ navigator: Navigator,
+ query: String,
+ global: Boolean,
+ // KMK -->
+ library: Boolean = false,
+ // KMK <--
+ ) {
if (global) {
navigator.push(GlobalSearchScreen(query))
return
@@ -585,7 +597,8 @@ class MangaScreen(
// KMK -->
navigator.popUntil { screen ->
- screen is BrowseSourceScreen || screen is HomeScreen || screen is SourceFeedScreen
+ screen is HomeScreen ||
+ !library && (screen is BrowseSourceScreen || screen is SourceFeedScreen)
}
// KMK <--
diff --git a/i18n-kmk/src/commonMain/moko-resources/ar/strings.xml b/i18n-kmk/src/commonMain/moko-resources/ar/strings.xml
index 8346c310c7..4ab75b50a9 100644
--- a/i18n-kmk/src/commonMain/moko-resources/ar/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/ar/strings.xml
@@ -6,7 +6,7 @@
ماتريكس
موكا
ياقوت
- البحث عن مصدر
+ البحث عن مصدر
تبديل NSFW فقط
وضع التحديد بالجملة
الأسئلة الشائعة والأدلة
diff --git a/i18n-kmk/src/commonMain/moko-resources/base/strings.xml b/i18n-kmk/src/commonMain/moko-resources/base/strings.xml
index 3c7d085453..dfdb5b87a8 100644
--- a/i18n-kmk/src/commonMain/moko-resources/base/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/base/strings.xml
@@ -1,7 +1,9 @@
- Search for source
+ Search for source
+ Source search
+ Library search
Toggle NSFW only
Bulk selection mode
FAQ and Guides
diff --git a/i18n-kmk/src/commonMain/moko-resources/cs/strings.xml b/i18n-kmk/src/commonMain/moko-resources/cs/strings.xml
index 996cb3a952..ea1c1365d8 100644
--- a/i18n-kmk/src/commonMain/moko-resources/cs/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/cs/strings.xml
@@ -1,6 +1,6 @@
- Hledat zdroj
+ Hledat zdroj
Přepnout pouze NSFW
Režim hromadného výběru
FAQ a návody
diff --git a/i18n-kmk/src/commonMain/moko-resources/da/strings.xml b/i18n-kmk/src/commonMain/moko-resources/da/strings.xml
index d185b75d6b..dea97e4908 100644
--- a/i18n-kmk/src/commonMain/moko-resources/da/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/da/strings.xml
@@ -1,6 +1,6 @@
- Søg efter kilde
+ Søg efter kilde
Slå kun NSFW til/fra
Masse valg tilstand
Ofte stillede spørgsmål og vejledninger
diff --git a/i18n-kmk/src/commonMain/moko-resources/de/strings.xml b/i18n-kmk/src/commonMain/moko-resources/de/strings.xml
index 5ae0fa0f74..9539c1aa09 100644
--- a/i18n-kmk/src/commonMain/moko-resources/de/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/de/strings.xml
@@ -6,7 +6,7 @@
Matrix
Mokka
Saphir
- Nach Quelle suchen
+ Nach Quelle suchen
Nur NSFW umschalten
Massenauswahlmodus
FAQ und Anleitungen
diff --git a/i18n-kmk/src/commonMain/moko-resources/el/strings.xml b/i18n-kmk/src/commonMain/moko-resources/el/strings.xml
index 5e22f4172a..d3c7df058c 100644
--- a/i18n-kmk/src/commonMain/moko-resources/el/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/el/strings.xml
@@ -1,6 +1,6 @@
- Αναζήτηση πηγής
+ Αναζήτηση πηγής
Εναλλαγή μόνο NSFW
Λειτουργία μαζικής επιλογής
Συχνές ερωτήσεις και οδηγοί
diff --git a/i18n-kmk/src/commonMain/moko-resources/es/strings.xml b/i18n-kmk/src/commonMain/moko-resources/es/strings.xml
index c8d6586871..56e08e98c9 100644
--- a/i18n-kmk/src/commonMain/moko-resources/es/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/es/strings.xml
@@ -6,7 +6,7 @@
Matrix
Moca
Zafiro
- Buscar fuente
+ Buscar fuente
Alternar sólo NSFW
Modo de selección masiva
Preguntas frecuentes y guías
diff --git a/i18n-kmk/src/commonMain/moko-resources/fi/strings.xml b/i18n-kmk/src/commonMain/moko-resources/fi/strings.xml
index 91b0496e32..1ec885a3f1 100644
--- a/i18n-kmk/src/commonMain/moko-resources/fi/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/fi/strings.xml
@@ -1,6 +1,6 @@
- Hae lähdekoodia
+ Hae lähdekoodia
Vaihda vain NSFW
Bulk valintatila
UKK ja oppaat
diff --git a/i18n-kmk/src/commonMain/moko-resources/fr/strings.xml b/i18n-kmk/src/commonMain/moko-resources/fr/strings.xml
index b1148de3bc..5b3a91ad17 100644
--- a/i18n-kmk/src/commonMain/moko-resources/fr/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/fr/strings.xml
@@ -6,7 +6,7 @@
Matrix
Mocha
Saphir
- Rechercher une source
+ Rechercher une source
Activer/désactiver uniquement NSFW
Mode de sélection en bloc
FAQ et tutoriels
diff --git a/i18n-kmk/src/commonMain/moko-resources/it/strings.xml b/i18n-kmk/src/commonMain/moko-resources/it/strings.xml
index 5108dec37b..0b30637db5 100644
--- a/i18n-kmk/src/commonMain/moko-resources/it/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/it/strings.xml
@@ -6,7 +6,7 @@
Matrix
Mocha
Zaffiro
- Cerca la sorgente
+ Cerca la sorgente
Attiva/disattiva solo NSFW
Modalità selezione Bulk
FAQ e guide
diff --git a/i18n-kmk/src/commonMain/moko-resources/ja/strings.xml b/i18n-kmk/src/commonMain/moko-resources/ja/strings.xml
index 36c14d3ea1..2e664e6ea6 100644
--- a/i18n-kmk/src/commonMain/moko-resources/ja/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/ja/strings.xml
@@ -1,6 +1,6 @@
- ソースを検索
+ ソースを検索
NSFWのみ切り替え
一括選択モード
FAQ とガイド
diff --git a/i18n-kmk/src/commonMain/moko-resources/nl/strings.xml b/i18n-kmk/src/commonMain/moko-resources/nl/strings.xml
index 1ba9693b17..c3d37f5277 100644
--- a/i18n-kmk/src/commonMain/moko-resources/nl/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/nl/strings.xml
@@ -1,6 +1,6 @@
- Bron zoeken
+ Bron zoeken
Alleen NSFW in-/uitschakelen
Bulk selectiemodus
FAQ en handleidingen
diff --git a/i18n-kmk/src/commonMain/moko-resources/pl/strings.xml b/i18n-kmk/src/commonMain/moko-resources/pl/strings.xml
index 5b4e90de81..fa841ccce3 100644
--- a/i18n-kmk/src/commonMain/moko-resources/pl/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/pl/strings.xml
@@ -1,6 +1,6 @@
- Szukaj źródła
+ Szukaj źródła
Przełącz tylko NSFW
Tryb masowego zaznaczenia
FAQ i przewodniki
diff --git a/i18n-kmk/src/commonMain/moko-resources/pt-rBR/strings.xml b/i18n-kmk/src/commonMain/moko-resources/pt-rBR/strings.xml
index e65cefff34..797e7756ef 100644
--- a/i18n-kmk/src/commonMain/moko-resources/pt-rBR/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/pt-rBR/strings.xml
@@ -6,7 +6,7 @@
Verde
Café
Safira
- Pesquisar fonte
+ Pesquisar fonte
Ativar/desativar somente NSFW
Modo de seleção em massa
FAQ e Guias
diff --git a/i18n-kmk/src/commonMain/moko-resources/pt/strings.xml b/i18n-kmk/src/commonMain/moko-resources/pt/strings.xml
index e65cefff34..797e7756ef 100644
--- a/i18n-kmk/src/commonMain/moko-resources/pt/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/pt/strings.xml
@@ -6,7 +6,7 @@
Verde
Café
Safira
- Pesquisar fonte
+ Pesquisar fonte
Ativar/desativar somente NSFW
Modo de seleção em massa
FAQ e Guias
diff --git a/i18n-kmk/src/commonMain/moko-resources/ro/strings.xml b/i18n-kmk/src/commonMain/moko-resources/ro/strings.xml
index 2066a5d803..f622a630b9 100644
--- a/i18n-kmk/src/commonMain/moko-resources/ro/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/ro/strings.xml
@@ -1,6 +1,6 @@
- Caută sursa
+ Caută sursa
Comută numai NSFW
Mod selecţie în masă
Întrebări frecvente și ghiduri
diff --git a/i18n-kmk/src/commonMain/moko-resources/ru/strings.xml b/i18n-kmk/src/commonMain/moko-resources/ru/strings.xml
index 6d743d5085..e195704407 100644
--- a/i18n-kmk/src/commonMain/moko-resources/ru/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/ru/strings.xml
@@ -6,7 +6,7 @@
Matrix
Мокко
Сапфир
- Поиск источника
+ Поиск источника
Переключить только NSFW
Режим массового выбора
FAQ и руководства
diff --git a/i18n-kmk/src/commonMain/moko-resources/sv/strings.xml b/i18n-kmk/src/commonMain/moko-resources/sv/strings.xml
index a4fbed81a1..fbd2f2922a 100644
--- a/i18n-kmk/src/commonMain/moko-resources/sv/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/sv/strings.xml
@@ -1,6 +1,6 @@
- Sök efter källa
+ Sök efter källa
Växla endast NSFW
Bulk markeringsläge
Vanliga frågor och guider
diff --git a/i18n-kmk/src/commonMain/moko-resources/uk/strings.xml b/i18n-kmk/src/commonMain/moko-resources/uk/strings.xml
index 75699748a3..69990b0d75 100644
--- a/i18n-kmk/src/commonMain/moko-resources/uk/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/uk/strings.xml
@@ -2,7 +2,7 @@
Бавовняні цукерки
Моча
- Пошук джерела
+ Пошук джерела
Лише NSFW
Масовий режим вибору
ЧаПи та керівництва
diff --git a/i18n-kmk/src/commonMain/moko-resources/zh-rCN/strings.xml b/i18n-kmk/src/commonMain/moko-resources/zh-rCN/strings.xml
index 505677ae96..fb3858eb07 100644
--- a/i18n-kmk/src/commonMain/moko-resources/zh-rCN/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/zh-rCN/strings.xml
@@ -6,7 +6,7 @@
黑客
摩卡
蓝宝石
- 搜索源
+ 搜索源
仅切换 NSFW
批量选择模式
常见问题和指南
diff --git a/i18n-kmk/src/commonMain/moko-resources/zh-rTW/strings.xml b/i18n-kmk/src/commonMain/moko-resources/zh-rTW/strings.xml
index cbbe619991..d55d5e5289 100644
--- a/i18n-kmk/src/commonMain/moko-resources/zh-rTW/strings.xml
+++ b/i18n-kmk/src/commonMain/moko-resources/zh-rTW/strings.xml
@@ -6,7 +6,7 @@
駭客
摩卡
藍寶石
- 搜尋來源
+ 搜尋來源
切換僅 NSFW
批量選擇模式
常見問題和指南