I have MutableLiveData of custom class named Data
private val mutableLiveData = MutableLiveData<Data>()
I have two table named A and B, first I get data from Table A and then from B. I do some business logic and then add it to mutableLiveData like below,
var obA = repository.getA()
var obB = repository.getB()
if (obA != null && obB != null) {
mutableLiveData.postValue(Data(obA, obB))
}
Now I am observing this mutableLiveData in my one fragment, I want that any change in TableA or TableB shoul update mutableLiveData, which is not currently updating. I don't know is it possible or not? can anyone suggest me if it is possible then how can I achive this, thanks in advance.