private void considerNotify ( ObserverWrapper observer ) { if ( ! observer . mActive ) { return ; } // Check latest state b4 dispatch. Maybe it changed state but we didn't get the event yet. // // we still first check observer.active to keep it as the entrance for events. So even if // the observer moved to an active state, if we've not received that event, we better not // notify for a more predictable notification order. if ( ! observer . shouldBeActive ( ) ) { observer . activeStateChanged ( false ) ; return ; } if ( observer . mLastVersion >= mVersion ) { return ; } observer . mLastVersion = mVersion ; //noinspection unchecked observer . mObserver . onChanged ( ( T ) mData ) ; }
Consider notify .