androidx.appcompat:appcompat:1.3.0 Transformations.switchMap doesn' t work

156 Views Asked by At

After i updated my build.gradle file and set the

implementation "androidx.appcompat:appcompat:1.2.0" -> implementation "androidx.appcompat:appcompat:1.3.0"

I have a piece of code

override var serverIdContactId: MutableLiveData<Pair<Long, Int>> = MutableLiveData(null)
    override val contact: LiveData<Account>
        get() = Transformations.switchMap(serverIdContactId) {
            it?.let {
                accountsRepository.byId(it.first, it.second)
            }
        }

and after setting the pair serverIdContactId, the Transformation never gets triggered! What does have changed?

0

There are 0 best solutions below