Skip to content

Commit

Permalink
Fix duplicate slot in exam schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
ezhil56x committed Mar 31, 2024
1 parent 4cefe40 commit 963ee37
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,14 @@ public void setExamItem(Exam.AllData examItem) {
venue.setVisibility(View.VISIBLE);
}

for (int i = 0; i < examItem.slots.size(); ++i) {
Chip slot = new Chip(this.examItem.getContext());
slot.setChipIconResource(R.drawable.ic_theory);
slot.setText(examItem.slots.get(i));
if (examItem.slots != null && slots.getChildCount() == 0) {
for (int i = 0; i < examItem.slots.size(); ++i) {
Chip slot = new Chip(this.examItem.getContext());
slot.setChipIconResource(R.drawable.ic_theory);
slot.setText(examItem.slots.get(i));

slots.addView(slot);
slots.addView(slot);
}
}
}
}
Expand Down

0 comments on commit 963ee37

Please sign in to comment.