Closed WedgeSparda closed 1 year ago
Hi @WedgeSparda,
You can grab the array of Content Cards and filter them based off the viewed
property to achieve the same behavior as unviewedContentCardCount
. Reference the code snippet below:
braze?.contentCards.cards.filter { !$0.viewed}.count
We will look to adding a convenience method for unviewedContentCardCount
to make it easier in a future release.
Thanks!
Great, thanks for the hint 👍
Hi @WedgeSparda,
We released SDK version 6.4.0 which add the convenience property Braze.ContentCards.unviewedCards
which will make it easier to fetch the unviewed content cards (and the count).
Thanks!
What problem are you facing?
Hi, we just migrated to this new SDK from AppBoy and one of the features we use and has completely disappear is
unviewedContentCardCount
provided by ABKContentCardsController.Could we get a similar functionality from
BrazeKit.Braze.ContentCards
?, currently the only option we have is accessing the Braze instance and call.contentCards.cards.count
, but that's providing the whole count, not just the unread ones.Is there any other way to get the unviewed cards count?
Thanks
Workarounds
We don't see a viable workaround for this
Ideal Solution
Provide a similar property to
unviewedContentCardCount
from AppBoy'sABKContentCardsController
Other Information
No response