summaryrefslogtreecommitdiff
path: root/Juick/ViewControllers/MessagesViewController.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-12-07 00:18:52 +0300
committerGravatar Vitaly Takmazov2017-12-07 00:18:52 +0300
commitd856b364dea82f7b89e2040075ee32d988707edb (patch)
tree963308593b095cc069845300f0ed0b59dd7c5e39 /Juick/ViewControllers/MessagesViewController.m
parent48234265991dd8ba8e26bd1fa7ea296a9f192ce9 (diff)
refactor
Diffstat (limited to 'Juick/ViewControllers/MessagesViewController.m')
-rw-r--r--Juick/ViewControllers/MessagesViewController.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/Juick/ViewControllers/MessagesViewController.m b/Juick/ViewControllers/MessagesViewController.m
index 71f4271..80e8c73 100644
--- a/Juick/ViewControllers/MessagesViewController.m
+++ b/Juick/ViewControllers/MessagesViewController.m
@@ -29,8 +29,8 @@
NSArray *newMsgs = next;
NSUInteger oldCount = [self.messages count];
if ([self.path isEqualToString:[APIClient threadUrl]]) {
- NSUInteger lastRid = [((Message *)[self.messages lastObject]).rid unsignedIntegerValue];
- NSUInteger count = [next count] - 1;
+ NSUInteger lastRid = [((Message *)[self.messages lastObject]).rid unsignedIntegerValue] + 1;
+ NSUInteger count = [next count];
if (oldCount > 0) {
if (lastRid && lastRid < count) {
newMsgs = [next subarrayWithRange:NSMakeRange(lastRid, count - lastRid)];