You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are places where MutableLiveData is required, for example in two way data binding. It may be better to make MutableLiveDataKtx a subtype of MutableLiveData as these dependencies are hard to change. Downside of this will be code duplication and the fact that MutableLiveDataKtx would not be subtype of LiveDataKtx anymore. I can make a pull request if you consider this as a good idea.
The text was updated successfully, but these errors were encountered:
Hi @opryzhek Thanks for your question. Code duplication is one of the thing I would like to avoid in the first place. I will look into it to see if there are any other approaches.
I've run through the code and found out that all extension methods like filter and map are already duplicated for LiveDataKtx, MutableLiveDataKtx and MediatorLiveDataKtx so we can just move some LiveDataKtx methods to separate interface. This way there would be almost zero additional code duplication. Same could be done to MediatorLiveDataKtx.
There are places where
MutableLiveData
is required, for example in two way data binding. It may be better to makeMutableLiveDataKtx
a subtype ofMutableLiveData
as these dependencies are hard to change. Downside of this will be code duplication and the fact thatMutableLiveDataKtx
would not be subtype ofLiveDataKtx
anymore. I can make a pull request if you consider this as a good idea.The text was updated successfully, but these errors were encountered: