Prevent overlay from opening for unopened gifts.

This commit is contained in:
Alex Hart
2022-07-11 14:51:30 -03:00
committed by Cody Henthorne
parent e03b54ac0f
commit 02ea5ac806
2 changed files with 24 additions and 1 deletions

View File

@@ -53,6 +53,10 @@ class OpenableGiftItemDecoration(context: Context) : RecyclerView.ItemDecoration
private val bowHeight = DimensionUnit.DP.toPixels(60f)
private val bowDrawable: Drawable = AppCompatResources.getDrawable(context, R.drawable.ic_gift_bow)!!
fun hasOpenedGiftThisSession(messageRecordId: Long): Boolean {
return messageIdsOpenedThisSession.contains(messageRecordId)
}
override fun onDestroy(owner: LifecycleOwner) {
super.onDestroy(owner)
animationState.clear()