Commit 920357ae44c40d3c5811159e8824122ccf272148
1 parent
46f6779bfd
Exists in
master
fix bug call request api
Showing 2 changed files with 4 additions and 1 deletions Side-by-side Diff
LifeLog/LifeLog/HomeViewController.m
... | ... | @@ -288,6 +288,9 @@ |
288 | 288 | for (NSInteger index = self.currentIndex*maxRequest; index < self.currentIndex*maxRequest + maxRequest; index++) { |
289 | 289 | if ((self.currentIndex*maxRequest + maxRequest) >= activities.count) { |
290 | 290 | self.totalRequest = (int)(activities.count - self.currentIndex*maxRequest); |
291 | + if (self.totalRequest <= 0) { | |
292 | + [weakSelf complete20Request:activities]; | |
293 | + } | |
291 | 294 | } |
292 | 295 | else { |
293 | 296 | self.totalRequest = (int)maxRequest; |