Source:
<code>private ReaderPostAdapter getPostAdapter() { if (mPostAdapter == null) { AppLog.d(T.READER, "reader post list > creating post adapter"); Context context = WPActivityUtils.getThemedContext(getActivity()); <START> mPostAdapter = new ReaderPostAdapter(context, getPostListType(), mImageManager, new NewsCardListener() { <END> @Override public void onItemClicked(@NotNull String url) { Activity activity = getActivity(); if (activity != null) { WPWebViewActivity.openURL(activity, url); } } @Override public void onDismissClicked(NewsItem item) { mViewModel.onDismissClicked(item); } }); mPostAdapter.setOnFollowListener(this); mPostAdapter.setOnPostSelectedListener(this); mPostAdapter.setOnPostPopupListener(this); mPostAdapter.setOnDataLoadedListener(mDataLoadedListener); mPostAdapter.setOnDataRequestedListener(mDataRequestedListener); mPostAdapter.setOnPostBookmarkedListener(mOnPostBookmarkedListener); if (getActivity() instanceof ReaderSiteHeaderView.OnBlogInfoLoadedListener) { mPostAdapter.setOnBlogInfoLoadedListener((ReaderSiteHeaderView.OnBlogInfoLoadedListener) getActivity()); } mViewModel.getNewsDataSource().removeObserver(mNewsItemObserver); if (getPostListType().isTagType()) { mPostAdapter.setCurrentTag(getCurrentTag()); mViewModel.getNewsDataSource().observe((FragmentActivity) getActivity(), mNewsItemObserver); } else if (getPostListType() == ReaderPostListType.BLOG_PREVIEW) { mPostAdapter.setCurrentBlogAndFeed(mCurrentBlogId, mCurrentFeedId); } else if (getPostListType() == ReaderPostListType.SEARCH_RESULTS) { ReaderTag searchTag = ReaderUtils.getTagForSearchQuery(mCurrentSearchQuery); mPostAdapter.setCurrentTag(searchTag); } } return mPostAdapter; }</code><technical_language>curious, reason setting listener in a constructor instead of setNewsCardListener, similar other listeners?? :)</technical_language>

Target:
private ReaderPostAdapter getPostAdapter() { if (mPostAdapter == null) { AppLog.d(T.READER, "reader post list > creating post adapter"); Context context = WPActivityUtils.getThemedContext(getActivity()); mPostAdapter = new ReaderPostAdapter(context, getPostListType(), mImageManager); mPostAdapter.setOnFollowListener(this); mPostAdapter.setOnPostSelectedListener(this); mPostAdapter.setOnPostPopupListener(this); mPostAdapter.setOnDataLoadedListener(mDataLoadedListener); mPostAdapter.setOnDataRequestedListener(mDataRequestedListener); mPostAdapter.setOnPostBookmarkedListener(mOnPostBookmarkedListener); mPostAdapter.setOnNewsCardListener(mNewsCardListener); if (getActivity() instanceof ReaderSiteHeaderView.OnBlogInfoLoadedListener) { mPostAdapter.setOnBlogInfoLoadedListener((ReaderSiteHeaderView.OnBlogInfoLoadedListener) getActivity()); } mViewModel.getNewsDataSource().removeObserver(mNewsItemObserver); if (getPostListType().isTagType()) { mPostAdapter.setCurrentTag(getCurrentTag()); mViewModel.getNewsDataSource().observe((FragmentActivity) getActivity(), mNewsItemObserver); } else if (getPostListType() == ReaderPostListType.BLOG_PREVIEW) { mPostAdapter.setCurrentBlogAndFeed(mCurrentBlogId, mCurrentFeedId); } else if (getPostListType() == ReaderPostListType.SEARCH_RESULTS) { ReaderTag searchTag = ReaderUtils.getTagForSearchQuery(mCurrentSearchQuery); mPostAdapter.setCurrentTag(searchTag); } } return mPostAdapter; }