PredictionViewModel
class PredictionViewModel(widgetInfos: WidgetInfos, analyticsService: AnalyticsService, configurationUserPairFlow: Flow<Pair<LiveLikeUser, SdkConfiguration>>, onDismiss: () -> Unit, currentUserFlow: StateFlow<LiveLikeUser?>, programRepository: ProgramRepository?, widgetMessagingClient: WidgetManager?, widgetInteractionRepository: WidgetInteractionRepository?, networkApiClient: NetworkApiClient, rewardItemMapCache: Map<String, RewardItem>, userProfileRewardDelegate: UserProfileDelegate?, dataStoreDelegate: DataStoreDelegate, lottieAnimationPath: (String) -> String?, viewModelDispatcher: CoroutineDispatcher, uiDispatcher: CoroutineDispatcher) : BaseViewModel, PredictionWidgetViewModel, FollowUpWidgetViewModel
Content copied to clipboard
Functions
claimRewards
Link copied to clipboard
open override fun claimRewards()
Content copied to clipboard
dismissWidget
Link copied to clipboard
followupState
Link copied to clipboard
fun followupState(selectedPredictionId: String, correctOptionId: String?, widgetWinAnimation: String, widgetLoseAnimation: String)
Content copied to clipboard
getGamificationReward
Link copied to clipboard
suspend fun getGamificationReward(rewardUrl: String, analyticsService: AnalyticsService, userAccessToken: String): ProgramGamificationProfile?
Content copied to clipboard
getPredictionVoteId
Link copied to clipboard
getUserInteraction
Link copied to clipboard
isInteractivityExpired
Link copied to clipboard
loadInteractionHistory
Link copied to clipboard
open override fun loadInteractionHistory(liveLikeCallback: LiveLikeCallback<List<PredictionWidgetUserInteraction>>)
Content copied to clipboard
lockInVote
Link copied to clipboard
markAsInteractive
Link copied to clipboard
open override fun markAsInteractive()
Content copied to clipboard
onOptionClicked
Link copied to clipboard
fun onOptionClicked()
Content copied to clipboard
startDismissTimout
Link copied to clipboard
subscribeWidgetResults
Link copied to clipboard
inline fun <T : Any> subscribeWidgetResults(channelName: String, sdkConfiguration: SdkConfiguration, user: LiveLikeUser, widgetId: String, flow: MutableStateFlow<T?>)
Content copied to clipboard
trackWidgetEngagedAnalytics
Link copied to clipboard
fun trackWidgetEngagedAnalytics(currentWidgetType: WidgetType?, currentWidgetId: String, programId: String)
Content copied to clipboard
unsubscribeWidgetResults
Link copied to clipboard
fun unsubscribeWidgetResults()
Content copied to clipboard
Properties
analyticsService
Link copied to clipboard
animationEggTimerProgress
Link copied to clipboard
animationPath
Link copied to clipboard
animationProgress
Link copied to clipboard
correctOptionIdFlow
Link copied to clipboard
dataStoreDelegate
Link copied to clipboard
enableDefaultWidgetTransition
Link copied to clipboard
gamificationProfile
Link copied to clipboard
resultsFlow
Link copied to clipboard
rewardsType
Link copied to clipboard
rewardType
Link copied to clipboard
selectedOptionId
Link copied to clipboard
selectedPositionFlow
Link copied to clipboard
selectionLockedFlow
Link copied to clipboard
showDismissButton
Link copied to clipboard
subscribedWidgetChannelName
Link copied to clipboard
subscribeResultJobs
Link copied to clipboard
timeoutStarted
Link copied to clipboard
timerStartTime
Link copied to clipboard
userSelectedOptionIdFlow
Link copied to clipboard
viewModelScope
Link copied to clipboard
voteResults
Link copied to clipboard
widgetData
Link copied to clipboard
widgetInfos
Link copied to clipboard
widgetInteractionRepository
Link copied to clipboard
widgetStateFlow
Link copied to clipboard