vnwalletui / com.venuenext.vnwalletui / WalletViewModel

WalletViewModel

class WalletViewModel : AndroidViewModel, LoginResultListener

Types

ViewState

sealed class ViewState

Constructors

<init>

WalletViewModel(application: Application)

Properties

actionBarTitle

val actionBarTitle: String?

ticketingInterface

var ticketingInterface: TicketingInterface?

viewStateLiveData

val viewStateLiveData: LiveData<ViewState!>

virtualCurrencyName

val virtualCurrencyName: String?

Functions

clearState

fun clearState(): Unit

loadData

Attempts to pull the loyalty user, doing a network call if necessary.

fun loadData(): Job

onCleared

fun onCleared(): Unit

onLoginFailure

fun onLoginFailure(): Unit

onLoginSuccess

fun onLoginSuccess(ticketingLoginData: TicketingLoginData): Unit

requestLoyaltyUser

Requests the loyalty user - if there is none, then this will launch the ticketing flow

suspend fun requestLoyaltyUser(): LoyaltyUser?