From ffdbf91b3cd547a61ef549457cfae8d7c2efb0b5 Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 4 Sep 2019 21:52:24 +0800 Subject: [PATCH] up --- .../legado/app/ui/main/findbook/FindBookAdapter.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 {