Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private fun getItem(position: Int): CampaignAd? {
- if (adsToWatch.isNotEmpty() && position <= adsToWatch.size) {
- return adsToWatch.getOrNull(position - 1)
- } else if (adsAlreadyWatched.isNotEmpty() && position > adsToWatch.size) {
- return adsAlreadyWatched.getOrNull(position.minus(if (adsToWatch.isEmpty()) 1 else 2))
- }
- return null
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement