Initial MergedSource creation UI

This commit is contained in:
NerdNumber9
2019-07-30 01:41:30 -04:00
parent 4c9be5557d
commit 10d6b3a6ca
13 changed files with 256 additions and 44 deletions

View File

@ -18,6 +18,7 @@ const val NHENTAI_SOURCE_ID = LEWD_SOURCE_SERIES + 7
val HENTAI_CAFE_SOURCE_ID = delegatedSourceId<HentaiCafe>()
const val TSUMINO_SOURCE_ID = LEWD_SOURCE_SERIES + 9
const val HITOMI_SOURCE_ID = LEWD_SOURCE_SERIES + 10
const val MERGED_SOURCE_ID = LEWD_SOURCE_SERIES + 69
private val DELEGATED_LEWD_SOURCES = listOf(
HentaiCafe::class

View File

@ -50,7 +50,7 @@ class SmartSearchController(bundle: Bundle? = null) : NucleusController<SmartSea
for(event in presenter.smartSearchChannel) {
withContext(NonCancellable) {
if (event is SmartSearchPresenter.SearchResults.Found) {
val transaction = MangaController(event.manga, true).withFadeTransaction()
val transaction = MangaController(event.manga, true, smartSearchConfig).withFadeTransaction()
withContext(Dispatchers.Main) {
router.replaceTopController(transaction)
}
@ -61,7 +61,7 @@ class SmartSearchController(bundle: Bundle? = null) : NucleusController<SmartSea
applicationContext?.toast("Error performing automatic search!")
}
val transaction = BrowseCatalogueController(source, smartSearchConfig.title).withFadeTransaction()
val transaction = BrowseCatalogueController(source, smartSearchConfig.origTitle, smartSearchConfig).withFadeTransaction()
withContext(Dispatchers.Main) {
router.replaceTopController(transaction)
}

View File

@ -54,7 +54,7 @@ class SmartSearchPresenter(private val source: CatalogueSource?, private val con
}
private suspend fun smartSearch(source: CatalogueSource, config: CatalogueController.SmartSearchConfig): SManga? {
val cleanedTitle = cleanSmartSearchTitle(config.title)
val cleanedTitle = cleanSmartSearchTitle(config.origTitle)
val queries = getSmartSearchQueries(cleanedTitle)