TMPurchaseFavoritesListener

This listener is used to back the functionality of the Favorites "Heart" button on the EDP action bar. If implemented, these listener methods should be backed by some kind of data store (a persisted list) that keeps track of a list of favorite events. These methods will only be called if the Favorite Button has been enabled by the TMPurchaseWebsiteConfiguration.

Functions

Link copied to clipboard
abstract fun isEventInFavorites(event: DiscoveryEvent, tmMemberInfo: MemberInfo?): Boolean

This method is called to determine if the event should be marked as favorite in the toolbar Note: This method is called when creating the options in the PurchaseActivity

Link copied to clipboard
abstract fun onEventAddedInFavorites(event: DiscoveryEvent, tmMemberInfo: MemberInfo?, completion: (Boolean) -> Unit)

Called when a user clicks on favorite icon to add current event to favorites.

Link copied to clipboard
abstract fun onEventRemovedFromFavorites(event: DiscoveryEvent, tmMemberInfo: MemberInfo?, completion: (Boolean) -> Unit)

Called when a user clicks on favorite icon to remove current event from favorites.