Using MediatorLiveData to return if two LiveDatas are true
Say I have two LiveData events, eventPlayerChose and eventOppChose, and I want to use MediatorLiveData eventRoundFinish to signal that both LiveDatas are true. Is this the best way to do so or is there a cleaner solution?
private val _eventPlayerChose = MutableLiveData()
val eventPlayerChose: LiveData
get() = _eventPlayerChose
private val _eventOppChose = MutableLiveData()
val eventOppChose: LiveData
get() = _eventOppChose
// a round finishes when both players choose
private val...