mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-21 13:19:02 +00:00
fix displaying buy set button
This commit is contained in:
parent
cb452b063a
commit
d82de5f333
1 changed files with 4 additions and 1 deletions
|
|
@ -96,7 +96,7 @@ class CustomizationRecyclerViewAdapter() : androidx.recyclerview.widget.Recycler
|
|||
override fun getItemViewType(position: Int): Int {
|
||||
if (customizationList.size <= position) return 0
|
||||
return if (this.customizationList[position] is CustomizationSet &&
|
||||
(position < customizationList.size && customizationList[position + 1] is CustomizationSet)
|
||||
(position == (customizationList.size - 1) || (position < customizationList.size && customizationList[position + 1] is CustomizationSet))
|
||||
) {
|
||||
1
|
||||
} else if (this.customizationList[position] is CustomizationSet) {
|
||||
|
|
@ -145,6 +145,9 @@ class CustomizationRecyclerViewAdapter() : androidx.recyclerview.widget.Recycler
|
|||
}
|
||||
}
|
||||
}
|
||||
if (lastSet.hasPurchasable) {
|
||||
customizationList.add(lastSet)
|
||||
}
|
||||
this.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue