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
Caused by: java.lang.ClassCastException: xxxActivity cannot be cast to com.hardsoftstudio.rxflux.dispatcher.RxViewDispatch
@Override public void onActivityDestroyed(Activity activity) {
activityCounter--;
List<RxStore> rxStoreList = ((RxViewDispatch) activity).getRxStoreListToUnRegister();
if (rxStoreList != null) {
for (RxStore rxStore: rxStoreList) {
rxStore.unregister();
}
}
...
2.((RxViewDispatch) activity).onRxViewUnRegistered() moved to onActivityStopped
Thus behaviour is slightly different from unRegister onActivityPaused in 0.3.1. I have two activities responding to a same Action under onRxStoreChanged. It's OK with 0.3.1, cause one activity is unregistered onPause(when another activity launches). Is there any solution for 0.3.2?
The text was updated successfully, but these errors were encountered:
I will add a check with instanceof RxViewDispatch. I wanted to force that all activities implement the method to avoid breaking the flow of flux. But I did not think on third parties.
I decided to move it to onStop so the activity still reacts when there is sth on top but is still there. I will think it better and I will maybe revert it to onPause and onResume.
Thanks for quick reply.
For question 2, I think you're right, keep it plz. In 0.3.1 I did repeat the code in order to catch that same action. Now, after refactoring my code, it seems to be more reasonable.
after upgrading to 0.3.2 I got several problems:
1.ClassCastException
Caused by: java.lang.ClassCastException: xxxActivity cannot be cast to com.hardsoftstudio.rxflux.dispatcher.RxViewDispatch
2.((RxViewDispatch) activity).onRxViewUnRegistered() moved to onActivityStopped
Thus behaviour is slightly different from unRegister onActivityPaused in 0.3.1. I have two activities responding to a same Action under onRxStoreChanged. It's OK with 0.3.1, cause one activity is unregistered onPause(when another activity launches). Is there any solution for 0.3.2?
The text was updated successfully, but these errors were encountered: