docs: public boolean hasNewHeader(int position, boolean isReverseLayout) {
      if (indexOutOfBounds(position)) {
        return false;
      }
  
      long headerId = mAdapter.getHeaderId(position);
  
      if (headerId < 0) {
        return false;
      }
  
      long nextItemHeaderId = -1;
      int nextItemPosition = position + (isReverseLayout? 1: -1);
      if (!indexOutOfBounds(nextItemPosition)){
        nextItemHeaderId = mAdapter.getHeaderId(nextItemPosition);
      }
      int firstItemPosition = isReverseLayout? mAdapter.getItemCount()-1 : 0;
  
      return position == firstItemPosition || headerId != nextItemHeaderId;
    }