|
|
|
@ -5,6 +5,7 @@ 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.Book |
|
|
|
|
import io.legado.app.data.entities.BookChapter |
|
|
|
|
import kotlinx.android.synthetic.main.item_download.view.* |
|
|
|
|
import org.jetbrains.anko.sdk27.listeners.onClick |
|
|
|
|
import org.jetbrains.anko.toast |
|
|
|
@ -14,6 +15,7 @@ class DownloadAdapter(context: Context, private val callBack: CallBack) : |
|
|
|
|
SimpleRecyclerAdapter<Book>(context, R.layout.item_download) { |
|
|
|
|
|
|
|
|
|
val cacheChapters = hashMapOf<String, HashSet<String>>() |
|
|
|
|
var downloadMap: HashMap<String, LinkedHashSet<BookChapter>>? = null |
|
|
|
|
|
|
|
|
|
override fun convert(holder: ItemViewHolder, item: Book, payloads: MutableList<Any>) { |
|
|
|
|
with(holder.itemView) { |
|
|
|
|