diff --git a/app/src/main/java/io/legado/app/ui/main/findbook/FindBookAdapter.kt b/app/src/main/java/io/legado/app/ui/main/findbook/FindBookAdapter.kt index 7f44fe28b..e85f451a9 100644 --- a/app/src/main/java/io/legado/app/ui/main/findbook/FindBookAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/main/findbook/FindBookAdapter.kt @@ -74,6 +74,13 @@ class FindBookAdapter(private val scope: CoroutineScope, val callBack: CallBack) val tv = LayoutInflater.from(context) .inflate(R.layout.item_text, gl_child, false) tv.text_view.text = kind.title + tv.text_view.onClick { + callBack.openExplore( + bookSource.bookSourceUrl, + kind.title, + kind.url + ) + } val rowSpecs = GridLayout.spec(rowNum, 1.0f) val colSpecs = GridLayout.spec(columnNum, 1.0f) val params = GridLayout.LayoutParams(rowSpecs, colSpecs) @@ -84,13 +91,6 @@ class FindBookAdapter(private val scope: CoroutineScope, val callBack: CallBack) columnNum = 0 rowNum++ } - tv.onClick { - callBack.openExplore( - bookSource.bookSourceUrl, - kind.title, - kind.url - ) - } } } }.onFinally {