use of com.xwray.groupie.Section in project PocketHub by pockethub.
the class CommitDiffListFragment method createFileSections.
private List<Section> createFileSections(List<FullCommitFile> files) {
List<Section> sections = new ArrayList<>();
for (FullCommitFile file : files) {
Section section = new Section(new CommitFileHeaderItem(getActivity(), file.getFile()));
List<CharSequence> lines = diffStyler.get(file.getFile().filename());
int number = 0;
for (CharSequence line : lines) {
section.add(new CommitFileLineItem(diffStyler, line));
for (GitComment comment : file.get(number)) {
section.add(new CommitCommentItem(avatars, commentImageGetter, comment, true));
}
number++;
}
sections.add(section);
}
return sections;
}
use of com.xwray.groupie.Section in project PocketHub by pockethub.
the class CommitCompareListFragment method createFileSections.
private List<Section> createFileSections(List<GitHubFile> files) {
List<Section> sections = new ArrayList<>();
for (GitHubFile file : files) {
Section section = new Section(new CommitFileHeaderItem(getActivity(), file));
List<CharSequence> lines = diffStyler.get(file.filename());
for (CharSequence line : lines) {
section.add(new CommitFileLineItem(diffStyler, line));
}
sections.add(section);
}
return sections;
}
Aggregations