Search in sources :

Example 1 with ReviewCommentsAdapter

use of com.fastaccess.ui.adapter.ReviewCommentsAdapter in project FastHub by k0shk0sh.

the class GroupedReviewsViewHolder method bind.

@Override
public void bind(@NonNull TimelineModel model) {
    GroupedReviewModel groupedReviewModel = model.getGroupedReviewModel();
    this.pathText = groupedReviewModel.getDiffText();
    name.setText(groupedReviewModel.getPath());
    stateImage.setImageResource(R.drawable.ic_eye);
    if (groupedReviewModel.getComments() == null || groupedReviewModel.getComments().isEmpty()) {
        nestedRecyclerView.setVisibility(View.GONE);
        nestedRecyclerView.setAdapter(null);
    } else {
        nestedRecyclerView.setVisibility(View.VISIBLE);
        nestedRecyclerView.setAdapter(new ReviewCommentsAdapter(groupedReviewModel.getComments(), this, onToggleView, reactionsCallback, repoOwner, poster));
        nestedRecyclerView.addDivider();
    }
    onToggle(onToggleView.isCollapsed(getId()), false);
}
Also used : ReviewCommentsAdapter(com.fastaccess.ui.adapter.ReviewCommentsAdapter) GroupedReviewModel(com.fastaccess.data.dao.GroupedReviewModel)

Aggregations

GroupedReviewModel (com.fastaccess.data.dao.GroupedReviewModel)1 ReviewCommentsAdapter (com.fastaccess.ui.adapter.ReviewCommentsAdapter)1