|
|
@ -12,6 +12,7 @@ import io.legado.app.data.entities.BookSource |
|
|
|
import io.legado.app.help.coroutine.Coroutine |
|
|
|
import io.legado.app.help.coroutine.Coroutine |
|
|
|
import io.legado.app.lib.theme.accentColor |
|
|
|
import io.legado.app.lib.theme.accentColor |
|
|
|
import io.legado.app.utils.ACache |
|
|
|
import io.legado.app.utils.ACache |
|
|
|
|
|
|
|
import io.legado.app.utils.dp |
|
|
|
import io.legado.app.utils.gone |
|
|
|
import io.legado.app.utils.gone |
|
|
|
import io.legado.app.utils.visible |
|
|
|
import io.legado.app.utils.visible |
|
|
|
import kotlinx.android.synthetic.main.item_fillet_text.view.* |
|
|
|
import kotlinx.android.synthetic.main.item_fillet_text.view.* |
|
|
@ -28,6 +29,11 @@ class ExploreAdapter(context: Context, private val scope: CoroutineScope, val ca |
|
|
|
|
|
|
|
|
|
|
|
override fun convert(holder: ItemViewHolder, item: BookSource, payloads: MutableList<Any>) { |
|
|
|
override fun convert(holder: ItemViewHolder, item: BookSource, payloads: MutableList<Any>) { |
|
|
|
with(holder.itemView) { |
|
|
|
with(holder.itemView) { |
|
|
|
|
|
|
|
if (holder.layoutPosition == getActualItemCount() - 1) { |
|
|
|
|
|
|
|
setPadding(16.dp, 12.dp, 16.dp, 12.dp) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
setPadding(16.dp, 12.dp, 16.dp, 0) |
|
|
|
|
|
|
|
} |
|
|
|
if (payloads.isEmpty()) { |
|
|
|
if (payloads.isEmpty()) { |
|
|
|
tv_name.text = item.bookSourceName |
|
|
|
tv_name.text = item.bookSourceName |
|
|
|
} |
|
|
|
} |
|
|
|