Skip to content

Commit

Permalink
Refresh bookmarks on appear when the table's empty.
Browse files Browse the repository at this point in the history
This can happen after the Core Data cache is deleted.
  • Loading branch information
nolanw committed Aug 23, 2013
1 parent 60ace51 commit e985ea9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Source/Threads/AwfulBookmarksController.m
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ - (void)loadPageNum:(NSUInteger)pageNum
- (BOOL)refreshOnAppear
{
if (![AwfulHTTPClient client].reachable) return NO;
if ([self.tableView numberOfRowsInSection:0] == 0) return YES;
if (!self.lastRefreshDate) return YES;
return [[NSDate date] timeIntervalSinceDate:self.lastRefreshDate] > 60 * 10;
}
Expand Down

0 comments on commit e985ea9

Please sign in to comment.