Source:
@Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); mViewModel = ViewModelProviders.of(this, mViewModelFactory) .get(ReaderPostListViewModel.class); mNewsCardViewModel = ViewModelProviders.of(requireActivity(), mViewModelFactory) .get(NewsCardViewModel.class); if (mIsTopLevel) { mReaderViewModel = ViewModelProviders.of(getParentFragment(), mViewModelFactory) .get(ReaderViewModel.class); } if (isFollowingScreen()) { initSubFilterViewModel(); } mViewModel.getNavigationEvents().observe(getViewLifecycleOwner(), event -> event.applyIfNotHandled(navTarget -> { if (navTarget instanceof ShowSitePickerForResult) { ShowSitePickerForResult data = (ShowSitePickerForResult) navTarget; ActivityLauncher.showSitePickerForResult( ReaderPostListFragment.this, data.getSite(), data.getMode() ); } else if (navTarget instanceof OpenEditorForReblog) { OpenEditorForReblog data = (OpenEditorForReblog) navTarget; ActivityLauncher.openEditorForReblog( getActivity(), data.getSite(), data.getPost(), data.getSource() ); } else if (navTarget instanceof ShowNoSitesToReblog) { ReaderActivityLauncher.showNoSiteToReblog(getActivity()); } else { throw new IllegalStateException("Action not supported in ReaderPostListFragment"); } return Unit.INSTANCE; })); mViewModel.start(mReaderViewModel); if (isFollowingScreen()) { mSubFilterViewModel.onUserComesToReader(); } if (getPostListType() == ReaderPostListType.SEARCH_RESULTS) { mRecyclerView.showAppBarLayout(); mSearchMenuItem.expandActionView(); mRecyclerView.setToolbarScrollFlags(0); } }

Target:
@Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); mViewModel = ViewModelProviders.of(this, mViewModelFactory) .get(ReaderPostListViewModel.class); mNewsCardViewModel = ViewModelProviders.of(requireActivity(), mViewModelFactory) .get(NewsCardViewModel.class); if (mIsTopLevel) { mReaderViewModel = ViewModelProviders.of(getParentFragment(), mViewModelFactory) .get(ReaderViewModel.class); } if (isFollowingScreen()) { initSubFilterViewModel(); } mViewModel.getNavigationEvents().observe(getViewLifecycleOwner(), event -> event.applyIfNotHandled(navTarget -> { if (navTarget instanceof ShowSitePickerForResult) { ShowSitePickerForResult data = (ShowSitePickerForResult) navTarget; ActivityLauncher.showSitePickerForResult( ReaderPostListFragment.this, data.getSite(), data.getMode() ); } else if (navTarget instanceof OpenEditorForReblog) { OpenEditorForReblog data = (OpenEditorForReblog) navTarget; ActivityLauncher.openEditorForReblog( getActivity(), data.getSite(), data.getPost(), data.getSource() ); } else if (navTarget instanceof ShowNoSitesToReblog) { ReaderActivityLauncher.showNoSiteToReblog(getActivity()); } else { throw new IllegalStateException("Action not supported in ReaderPostListFragment"); } return Unit.INSTANCE; })); mViewModel.getSnackbarEvents().observe(getViewLifecycleOwner(), event -> event.applyIfNotHandled(holder -> { WPSnackbar.make( requireView(), holder.getMessageRes(), Snackbar.LENGTH_LONG ).show(); return Unit.INSTANCE; }) ); mViewModel.start(mReaderViewModel); if (isFollowingScreen()) { mSubFilterViewModel.onUserComesToReader(); } if (getPostListType() == ReaderPostListType.SEARCH_RESULTS) { mRecyclerView.showAppBarLayout(); mSearchMenuItem.expandActionView(); mRecyclerView.setToolbarScrollFlags(0); } }