diff --git a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt index f845dc1d2..e0bb068d1 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt @@ -29,6 +29,8 @@ import io.legado.app.model.CheckSource import io.legado.app.model.Debug import io.legado.app.ui.association.ImportBookSourceDialog import io.legado.app.ui.book.import.local.rule.TxtTocRuleActivity +import io.legado.app.ui.book.search.SearchActivity +import io.legado.app.ui.book.search.SearchScope import io.legado.app.ui.book.source.debug.BookSourceDebugActivity import io.legado.app.ui.book.source.edit.BookSourceEditActivity import io.legado.app.ui.config.CheckSourceConfig @@ -605,6 +607,12 @@ class BookSourceActivity : VMBaseActivity { + putExtra("searchScope", SearchScope(bookSource).toString()) + } + } + override fun debug(bookSource: BookSource) { startActivity { putExtra("key", bookSource.bookSourceUrl) diff --git a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceAdapter.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceAdapter.kt index c6dd8598d..2d10abf4d 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceAdapter.kt @@ -188,6 +188,7 @@ class BookSourceAdapter(context: Context, val callBack: CallBack) : putExtra("type", "bookSource") putExtra("key", source.bookSourceUrl) } + R.id.menu_search -> callBack.searchBook(source) R.id.menu_debug_source -> callBack.debug(source) R.id.menu_del -> callBack.del(source) R.id.menu_enable_explore -> { @@ -314,6 +315,7 @@ class BookSourceAdapter(context: Context, val callBack: CallBack) : fun update(vararg bookSource: BookSource) fun toTop(bookSource: BookSource) fun toBottom(bookSource: BookSource) + fun searchBook(bookSource: BookSource) fun debug(bookSource: BookSource) fun upOrder() fun upCountView() diff --git a/app/src/main/res/menu/book_source_item.xml b/app/src/main/res/menu/book_source_item.xml index acc6a6ed8..384d30516 100644 --- a/app/src/main/res/menu/book_source_item.xml +++ b/app/src/main/res/menu/book_source_item.xml @@ -13,6 +13,10 @@ android:id="@+id/menu_login" android:title="@string/login" /> + +