From 85902e702eed98088eef90e076df18bfb21043b3 Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 27 Sep 2019 13:14:49 +0800 Subject: [PATCH] up --- .../app/ui/main/bookshelf/BookGroupAdapter.kt | 24 ------------------- .../ui/main/bookshelf/BookshelfFragment.kt | 5 ---- 2 files changed, 29 deletions(-) delete mode 100644 app/src/main/java/io/legado/app/ui/main/bookshelf/BookGroupAdapter.kt diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookGroupAdapter.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookGroupAdapter.kt deleted file mode 100644 index 9e5dd0722..000000000 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookGroupAdapter.kt +++ /dev/null @@ -1,24 +0,0 @@ -package io.legado.app.ui.main.bookshelf - -import android.content.Context -import io.legado.app.R -import io.legado.app.base.adapter.ItemViewHolder -import io.legado.app.base.adapter.SimpleRecyclerAdapter -import io.legado.app.data.entities.BookGroup -import kotlinx.android.synthetic.main.item_book_group.view.* -import org.jetbrains.anko.sdk27.listeners.onClick - -class BookGroupAdapter(context: Context, val callBack: CallBack) : - SimpleRecyclerAdapter(context, R.layout.item_book_group) { - - override fun convert(holder: ItemViewHolder, item: BookGroup, payloads: MutableList) { - with(holder.itemView) { - tv_group.text = item.groupName - tv_group.onClick { callBack.onClickGroup(holder.layoutPosition) } - } - } - - interface CallBack { - fun onClickGroup(position: Int) - } -} \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt index 26924d5d3..b7f91a0af 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt @@ -28,7 +28,6 @@ import org.jetbrains.anko.startActivity class BookshelfFragment : VMBaseFragment(R.layout.fragment_bookshelf), SearchView.OnQueryTextListener, - BookGroupAdapter.CallBack, BookshelfAdapter.CallBack { override val viewModel: BookshelfViewModel @@ -84,10 +83,6 @@ class BookshelfFragment : VMBaseFragment(R.layout.fragment_b }) } - override fun onClickGroup(position: Int) { - view_pager_bookshelf.setCurrentItem(position, false) - } - override fun onQueryTextSubmit(query: String?): Boolean { context?.startActivity(Pair("key", query)) return false