summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Juick/ViewControllers/MessagesViewController.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/Juick/ViewControllers/MessagesViewController.m b/Juick/ViewControllers/MessagesViewController.m
index fb3f63b..804b47b 100644
--- a/Juick/ViewControllers/MessagesViewController.m
+++ b/Juick/ViewControllers/MessagesViewController.m
@@ -148,7 +148,7 @@ NSString* const messageCellIdentifier = @"messageCell";
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- if (self.dataLoading && self.messages.count == 0) {
+ if ((self.dataLoading && self.messages.count == 0) || indexPath.row >= self.messages.count) {
return [tableView dequeueReusableCellWithIdentifier:@"contentLoadingCell"];
} else {
Message *msg = [self.messages objectAtIndex:indexPath.row];