-
Notifications
You must be signed in to change notification settings - Fork 840
View should load it's content after reusing retained fragment after screen is back on #323
Description
Mosby Version: 3.1.1-SNAPSHOT (just upgraded from 3.0.4)
Expected behavior View should load it's content after reusing retained fragment
Actual behavior (include a stacktrace if crash) It does not
Hello :). I'm not sure if this is a bug report or a question. When i build and install my apk while devices screen is off, since 3.1.0 my retained fragment creates it's viewState, calls presenter.loadData BUT it is detached before view.setData/showContent is called. Then, when i turn screen on I'm stuck on loading state so I'd expect it to reload data but applyViewState == true, applyViewStateFromMemory == true so when onViewStateInstanceRestored is called with instanceStateRetainedInMemory == true, nothing happens. Is this a bug? If you could confirm it I can start working on solution, but I'm not sure if I understand problem correctly. Thanks!!
@Override public void onViewStateInstanceRestored(boolean instanceStateRetainedInMemory) { if (!instanceStateRetainedInMemory && viewState.isLoadingState()) { loadData(viewState.isPullToRefreshLoadingState()); } }
Edit: I've just tried to use QueueingPresenter but after long migration it seems like it changes my apps behavior (ViewPagers losing index after rotation etc.). Currently as a hotfix I need to fork 3.0.4 to repair BackStackAccessor but maybe you could suggest me a better solution..? I'd be really grateful.
Edit2: I've successfully recreated all needed functionality and will stick to QueuingPresenter for now.