Newer
Older
DevAndroid / app / src / main / java / keijumt / devandroid / viewmodel / MainViewModel.kt
package keijumt.devandroid.viewmodel

import keijumt.devandroid.databinding.SingleLiveEvent
import javax.inject.Inject

class MainViewModel @Inject constructor() : BaseViewModel() {

    val event = SingleLiveEvent<Event>()

    enum class Event {
        Api,
        Async
    }

    fun startApi() {
        event.value = Event.Api
    }

    fun startAsync() {
        event.value = Event.Async
    }
}