The condition I apply for both snacks are AfterNumberOfOpportunities(3).
In this case always the first snack defined in the builder is shown and I never see the second snack shown.
What I expect is in the 4th opportunity show first snack, then in the 5th opportunity show second snack, since condition 5 > 3 is true.
I believe this problem occurs because in SnackStats class the method getLastSnackShow() returns generic value, instead of "per Snack" values which is defined by the KEY_LAST_SNACK_SHOW + the Snack unique id.
I have multiple snacks with same conditions.
The condition I apply for both snacks are
AfterNumberOfOpportunities(3)
.In this case always the first snack defined in the builder is shown and I never see the second snack shown.
What I expect is in the 4th opportunity show first snack, then in the 5th opportunity show second snack, since condition 5 > 3 is true.
I believe this problem occurs because in
SnackStats
class the methodgetLastSnackShow()
returns generic value, instead of "per Snack" values which is defined by the KEY_LAST_SNACK_SHOW + the Snack unique id.I hope I was clear.