File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
app/src/main/java/com/runnect/runnect/presentation/discover/adapter Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,9 @@ package com.runnect.runnect.presentation.discover.adapter
22
33import android.view.LayoutInflater
44import android.view.ViewGroup
5- import androidx.recyclerview.widget.ListAdapter
65import androidx.recyclerview.widget.RecyclerView
76import com.runnect.runnect.databinding.ItemDiscoverBannerBinding
87import com.runnect.runnect.domain.entity.DiscoverBanner
9- import com.runnect.runnect.util.callback.diff.ItemDiffCallback
10- import timber.log.Timber
118
129class BannerAdapter (
1310 private val banners : List <DiscoverBanner >,
@@ -26,7 +23,7 @@ class BannerAdapter(
2623 holder.onBind(banners[actualPosition])
2724 }
2825
29- override fun getItemCount (): Int = Int .MAX_VALUE
26+ override fun getItemCount (): Int = if (banners.isEmpty()) 0 else Int .MAX_VALUE
3027
3128 class BannerViewHolder (
3229 private val binding : ItemDiscoverBannerBinding ,
You can’t perform that action at this time.
0 commit comments