mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
58c096d8dc
commit
5ee45055ea
@ -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<ActivityBookSourceBinding, BookSourceV
|
||||
viewModel.bottomSource(bookSource)
|
||||
}
|
||||
|
||||
override fun searchBook(bookSource: BookSource) {
|
||||
startActivity<SearchActivity> {
|
||||
putExtra("searchScope", SearchScope(bookSource).toString())
|
||||
}
|
||||
}
|
||||
|
||||
override fun debug(bookSource: BookSource) {
|
||||
startActivity<BookSourceDebugActivity> {
|
||||
putExtra("key", bookSource.bookSourceUrl)
|
||||
|
@ -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()
|
||||
|
@ -13,6 +13,10 @@
|
||||
android:id="@+id/menu_login"
|
||||
android:title="@string/login" />
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_search"
|
||||
android:title="@string/search" />
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_debug_source"
|
||||
android:title="@string/debug" />
|
||||
|
Loading…
Reference in New Issue
Block a user