gt:             showComments = post.numReplies > 0;
context: package org.wordpress.android.ui.reader.adapters;
  
  import android.content.Context;
  import android.os.AsyncTask;
  import android.support.v7.widget.CardView;
  import android.support.v7.widget.RecyclerView;
  import android.text.TextUtils;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.ImageView;
  import android.widget.RelativeLayout;
  import android.widget.TextView;
  
  import org.wordpress.android.R;
  import org.wordpress.android.analytics.AnalyticsTracker;
  import org.wordpress.android.datasets.ReaderPostTable;
  import org.wordpress.android.models.ReaderPost;
  import org.wordpress.android.models.ReaderPostList;
  import org.wordpress.android.models.ReaderTag;
  import org.wordpress.android.ui.reader.ReaderActivityLauncher;
  import org.wordpress.android.ui.reader.ReaderAnim;
  import org.wordpress.android.ui.reader.ReaderConstants;
  import org.wordpress.android.ui.reader.ReaderInterfaces;
  import org.wordpress.android.ui.reader.ReaderTypes;
  import org.wordpress.android.ui.reader.actions.ReaderActions;
  import org.wordpress.android.ui.reader.actions.ReaderBlogActions;
  import org.wordpress.android.ui.reader.actions.ReaderPostActions;
  import org.wordpress.android.ui.reader.utils.ReaderUtils;
  import org.wordpress.android.ui.reader.views.ReaderFollowButton;
  import org.wordpress.android.ui.reader.views.ReaderIconCountView;
  import org.wordpress.android.util.AppLog;
  import org.wordpress.android.util.DateTimeUtils;
  import org.wordpress.android.util.DisplayUtils;
  import org.wordpress.android.util.ToastUtils;
  import org.wordpress.android.widgets.WPNetworkImageView;
  
  public class ReaderPostAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
      private ReaderTag mCurrentTag;
      private long mCurrentBlogId;
  
      private final int mPhotonWidth;
      private final int mPhotonHeight;
      private final int mAvatarSz;
      private final int mMarginLarge;
  
      private boolean mCanRequestMorePosts;
      private boolean mShowToolbarSpacer;
      private final boolean mIsLoggedOutReader;
  
      private final ReaderTypes.ReaderPostListType mPostListType;
      private final ReaderPostList mPosts = new ReaderPostList();
  
      private ReaderInterfaces.OnPostSelectedListener mPostSelectedListener;
      private ReaderInterfaces.OnTagSelectedListener mOnTagSelectedListener;
      private ReaderInterfaces.OnPostPopupListener mOnPostPopupListener;
      private ReaderInterfaces.DataLoadedListener mDataLoadedListener;
      private ReaderActions.DataRequestedListener mDataRequestedListener;
  
      // the large "tbl_posts.text" column is unused here, so skip it when querying
      private static final boolean EXCLUDE_TEXT_COLUMN = true;
      private static final int MAX_ROWS = ReaderConstants.READER_MAX_POSTS_TO_DISPLAY;
  
      class ReaderPostViewHolder extends RecyclerView.ViewHolder {
          private final CardView cardView;
  
          private final TextView txtTitle;
          private final TextView txtText;
          private final TextView txtBlogName;
          private final TextView txtDate;
          private final TextView txtTag;
  
          private final ReaderIconCountView commentCount;
          private final ReaderIconCountView likeCount;
          private final ReaderFollowButton followButton;
  
          private final ImageView imgMore;
  
          private final WPNetworkImageView imgFeatured;
          private final WPNetworkImageView imgAvatar;
  
          private final ViewGroup layoutPostHeader;
          private final View toolbarSpacer;
  
          public ReaderPostViewHolder(View itemView) {
              super(itemView);
  
              cardView = (CardView) itemView.findViewById(R.id.card_view);
  
              txtTitle = (TextView) itemView.findViewById(R.id.text_title);
              txtText = (TextView) itemView.findViewById(R.id.text_excerpt);
              txtBlogName = (TextView) itemView.findViewById(R.id.text_blog_name);
              txtDate = (TextView) itemView.findViewById(R.id.text_date);
              txtTag = (TextView) itemView.findViewById(R.id.text_tag);
  
              commentCount = (ReaderIconCountView) itemView.findViewById(R.id.count_comments);
              likeCount = (ReaderIconCountView) itemView.findViewById(R.id.count_likes);
              followButton = (ReaderFollowButton) itemView.findViewById(R.id.follow_button);
  
              imgFeatured = (WPNetworkImageView) itemView.findViewById(R.id.image_featured);
              imgAvatar = (WPNetworkImageView) itemView.findViewById(R.id.image_avatar);
              imgMore = (ImageView) itemView.findViewById(R.id.image_more);
  
              layoutPostHeader = (ViewGroup) itemView.findViewById(R.id.layout_post_header);
              toolbarSpacer = itemView.findViewById(R.id.spacer_toolbar);
          }
      }
  
      @Override
      public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          View postView = LayoutInflater.from(parent.getContext()).inflate(R.layout.reader_cardview_post, parent, false);
          return new ReaderPostViewHolder(postView);
      }
  
      @Override
      public void onBindViewHolder(final RecyclerView.ViewHolder holder, final int position) {
          final ReaderPost post = getItem(position);
          final ReaderPostViewHolder postHolder = (ReaderPostViewHolder) holder;
          ReaderTypes.ReaderPostListType postListType = getPostListType();
  
          postHolder.txtTitle.setText(post.getTitle());
          postHolder.txtDate.setText(DateTimeUtils.javaDateToTimeSpan(post.getDatePublished()));
  
          postHolder.toolbarSpacer.setVisibility(position == 0 && mShowToolbarSpacer ? View.VISIBLE : View.GONE);
  
          // hide the post header (avatar, blog name & follow button) if we're showing posts
          // in a specific blog
          if (postListType == ReaderTypes.ReaderPostListType.BLOG_PREVIEW) {
              postHolder.layoutPostHeader.setVisibility(View.GONE);
          } else {
              postHolder.layoutPostHeader.setVisibility(View.VISIBLE);
              postHolder.imgAvatar.setImageUrl(post.getPostAvatarForDisplay(mAvatarSz), WPNetworkImageView.ImageType.AVATAR);
              if (post.hasBlogName()) {
                  postHolder.txtBlogName.setText(post.getBlogName());
              } else if (post.hasAuthorName()) {
                  postHolder.txtBlogName.setText(post.getAuthorName());
              } else {
                  postHolder.txtBlogName.setText(null);
              }
  
              // follow/following
              if (mIsLoggedOutReader) {
                  postHolder.followButton.setVisibility(View.GONE);
              } else {
                  postHolder.followButton.setIsFollowed(post.isFollowedByCurrentUser);
                  postHolder.followButton.setOnClickListener(new View.OnClickListener() {
                      @Override
                      public void onClick(View v) {
                          toggleFollow((ReaderFollowButton) v, position);
                      }
                  });
              }
  
              // show blog/feed preview when avatar is tapped
              postHolder.imgAvatar.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View view) {
                      ReaderActivityLauncher.showReaderBlogPreview(view.getContext(), post);
                  }
              });
          }
  
          if (post.hasExcerpt()) {
              postHolder.txtText.setVisibility(View.VISIBLE);
              postHolder.txtText.setText(post.getExcerpt());
          } else {
              postHolder.txtText.setVisibility(View.GONE);
          }
  
          final int titleMargin;
          if (post.hasFeaturedImage()) {
              final String imageUrl = post.getFeaturedImageForDisplay(mPhotonWidth, mPhotonHeight);
              postHolder.imgFeatured.setImageUrl(imageUrl, WPNetworkImageView.ImageType.PHOTO);
              postHolder.imgFeatured.setVisibility(View.VISIBLE);
              titleMargin = mMarginLarge;
          } else if (post.hasFeaturedVideo()) {
              postHolder.imgFeatured.setVideoUrl(post.postId, post.getFeaturedVideo());
              postHolder.imgFeatured.setVisibility(View.VISIBLE);
              titleMargin = mMarginLarge;
          } else {
              postHolder.imgFeatured.setVisibility(View.GONE);
              titleMargin = (postHolder.layoutPostHeader.getVisibility() == View.VISIBLE ? 0 : mMarginLarge);
          }
  
          // set the top margin of the title based on whether there's a featured image and post header
          RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) postHolder.txtTitle.getLayoutParams();
          params.topMargin = titleMargin;
  
          // show the best tag for this post
          final String tagToDisplay = (mCurrentTag != null ? post.getTagForDisplay(mCurrentTag.getTagName()) : null);
          if (!TextUtils.isEmpty(tagToDisplay)) {
              postHolder.txtTag.setText(tagToDisplay);
              postHolder.txtTag.setVisibility(View.VISIBLE);
              postHolder.txtTag.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {
                      if (mOnTagSelectedListener != null) {
                          mOnTagSelectedListener.onTagSelected(tagToDisplay);
                      }
                  }
              });
          } else {
              postHolder.txtTag.setVisibility(View.GONE);
              postHolder.txtTag.setOnClickListener(null);
          }
  
          boolean showLikes;
          boolean showComments;
          if (mIsLoggedOutReader) {
              showLikes = post.numLikes > 0;
  