braze-inc / braze-flutter-sdk

Public repo for the Braze Flutter SDK
Other
15 stars 29 forks source link

[Bug]: Issue with Content Cards custom implementation #36

Closed leofeng99 closed 1 year ago

leofeng99 commented 1 year ago

When trying to custom implement Content Cards using subscribeToContentCards, the callback for content cards is not triggered when the content card list is empty inside the Braze SDK. A guard condition is found here that prevented the callback to be triggered.

In the case of there is only 1 content card left in the Braze SDK, when that card is either dismissed or expired, the card is removed from the Braze SDK content card list, but my application doesn't get notified via the subscribe callback due to the empty card list check. Therefore there is no way for my application to update custom content card UI to reflect the state change of the content card list (from 1 content card in the list -> empty content card list).

Is it possible to remove the condition linked above?

hokstuff commented 1 year ago

Hi @leofeng99,

Thanks for bringing up this issue! This guard statement was introduced in version 2.2.0, but your description above sounds like a valid use case. We will remove this check in our next release and respond back here when it is ready.

leofeng99 commented 1 year ago

@hokstuff Awsome! Thanks!

hokstuff commented 1 year ago

Hi @leofeng99,

We just released the Braze Flutter SDK version 3.0.1 which addresses this issue.

Thanks!