summaryrefslogtreecommitdiff
path: root/Juick/ViewControllers
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/ViewControllers')
-rw-r--r--Juick/ViewControllers/DiscoverViewController.m4
-rw-r--r--Juick/ViewControllers/FeedViewController.m9
2 files changed, 4 insertions, 9 deletions
diff --git a/Juick/ViewControllers/DiscoverViewController.m b/Juick/ViewControllers/DiscoverViewController.m
index 7fb2805..f75e7d5 100644
--- a/Juick/ViewControllers/DiscoverViewController.m
+++ b/Juick/ViewControllers/DiscoverViewController.m
@@ -25,8 +25,8 @@
- (void)loadMore {
Message *lastMsg = [self.messages lastObject];
if (lastMsg != nil) {
- NSDate *msgDate = [[APIClient sharedClient].dateFormatter dateFromString:lastMsg.timestamp];
- self.params = [@{@"to" : [NSString stringWithFormat:@"%.0f", [msgDate timeIntervalSince1970] * 1000]} mutableCopy];
+ NSNumber *lastMid = lastMsg.mid;
+ self.params = [@{@"before_mid":lastMid} mutableCopy];
[self setShouldScrollToBottomOnRefresh:NO];
[self refreshData];
}
diff --git a/Juick/ViewControllers/FeedViewController.m b/Juick/ViewControllers/FeedViewController.m
index f664f62..fc8c387 100644
--- a/Juick/ViewControllers/FeedViewController.m
+++ b/Juick/ViewControllers/FeedViewController.m
@@ -38,13 +38,8 @@
-(void) loadMore {
Message *lastMsg = [self.messages lastObject];
if (lastMsg != nil) {
- if ([self.path isEqualToString:[APIClient discussionsUrl]]) {
- NSDate *msgDate = [[APIClient sharedClient].dateFormatter dateFromString:lastMsg.timestamp];
- self.params = [@{@"to" : [NSString stringWithFormat:@"%.0f", [msgDate timeIntervalSince1970] * 1000]} mutableCopy];
- } else if (![self.path isEqualToString:[APIClient threadUrl]]) {
- NSNumber *lastMid = lastMsg.mid;
- self.params = [@{@"before_mid":lastMid} mutableCopy];
- }
+ NSNumber *lastMid = lastMsg.mid;
+ self.params = [@{@"before_mid":lastMid} mutableCopy];
[self setShouldScrollToBottomOnRefresh:NO];
[self refreshData];
}