Closed yigit closed 6 years ago
to be clear, consecutive setState
calls trigger invalidate only once.
08-23 21:14:03.900 8309-8338/com.birbit.android.devto D/MVRX: setting state to update 1535084043900
08-23 21:14:03.900 8309-8309/com.birbit.android.devto D/MVRX: updating UI to update 1535084043900
08-23 21:14:03.901 8309-8309/com.birbit.android.devto D/MVRX: updating UI to update 1535084043900
08-23 21:19:11.827 8309-8338/com.birbit.android.devto D/MVRX: setting state to update 1535084351827
08-23 21:19:11.828 8309-8309/com.birbit.android.devto D/MVRX: updating UI to update 1535084351827
08-23 21:19:15.234 8309-8338/com.birbit.android.devto D/MVRX: setting state to update 1535084355234
08-23 21:19:15.234 8309-8309/com.birbit.android.devto D/MVRX: updating UI to update 1535084355234
08-23 21:19:15.912 8309-8338/com.birbit.android.devto D/MVRX: setting state to update 1535084355912
08-23 21:19:15.913 8309-8309/com.birbit.android.devto D/MVRX: updating UI to update 1535084355912
I think it's because the first one triggers the lazy delegate which delivers the first value. I'm going to look in to that today :)
This should be fixed now.
when
setState
is called for the very first time, invalidate of theMvRxView
(fragment) is called twice. It might also be realated to the fact thatinvalidate
is not called for a fresh Fragment untilsetState
is called. (i would expect at least 1 invalidate after initialization) The code below triggers a setState when user clicks on the text view. This is the log I receive: