Skip to content

Commit

Permalink
Makes tutorials display within their timeslots
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjrn committed Jan 28, 2016
1 parent ccab2ab commit 90ef6cd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions android/app/src/main/java/org/s31/oscon2012/Schedule.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,18 @@ public static List<Event> eventsInDateRange(Calendar start, Calendar end) {
"" + start + "\n" + end + "\n" + "\n" + e.startDate()
+ "\n" + e.endDate());
}

// If the talk starts in this timeslot, add it
if (start.compareTo(e.startDate()) <= 0
&& end.compareTo(e.endDate()) >= 0) {
// This talk fits within this timeslot
ev.add(e);
} else if (e.startDate().compareTo(start) <= 0 &&
e.endDate().compareTo(end) >= 0) {
// This timeslot fits within this talk
ev.add(e);
}

}

return ev;
Expand Down

0 comments on commit 90ef6cd

Please sign in to comment.