Skip to content

Commit

Permalink
Cancelling previous query before starting a new one.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsakuda committed Jun 9, 2012
1 parent 89358d9 commit 4c0b850
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions HI Capacity/CalendarViewController.m
Expand Up @@ -60,6 +60,11 @@ - (NSArray*) calendarMonthView:(TKCalendarMonthView*)monthView marksFromDate:(NS
// Dates don't match, need to perform a new asynchronous query
[self showLoading];

// Cancel any previous query
if (runningOp != nil) {
[runningOp cancel];
}

// keep track of the last start and end dates queried for
lastStartDate = startDate;
lastEndDate = lastDate;
Expand Down

0 comments on commit 4c0b850

Please sign in to comment.