diff options
author | Vitaly Takmazov | 2019-03-24 11:41:10 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2019-03-24 11:43:02 +0300 |
commit | aab91a39e9e24994d01adc4094dfe0bbd566d121 (patch) | |
tree | 37e84e11a359f4e7a8aa17a31c02f71b4172d96c | |
parent | e16eb980016b370f16bb8315434152decc1239b3 (diff) |
Fix inifinite scrolling
-rw-r--r-- | Juick/ViewControllers/DiscoverViewController.m | 1 | ||||
-rw-r--r-- | Juick/ViewControllers/DiscussionsController.m | 1 | ||||
-rw-r--r-- | Juick/ViewControllers/FeedViewController.m | 1 | ||||
-rw-r--r-- | Juick/ViewControllers/NewPostViewController.m | 1 | ||||
-rw-r--r-- | Juick/ViewControllers/ThreadViewController.m | 1 |
5 files changed, 5 insertions, 0 deletions
diff --git a/Juick/ViewControllers/DiscoverViewController.m b/Juick/ViewControllers/DiscoverViewController.m index cba3ca2..7fb2805 100644 --- a/Juick/ViewControllers/DiscoverViewController.m +++ b/Juick/ViewControllers/DiscoverViewController.m @@ -28,6 +28,7 @@ NSDate *msgDate = [[APIClient sharedClient].dateFormatter dateFromString:lastMsg.timestamp]; self.params = [@{@"to" : [NSString stringWithFormat:@"%.0f", [msgDate timeIntervalSince1970] * 1000]} mutableCopy]; [self setShouldScrollToBottomOnRefresh:NO]; + [self refreshData]; } } diff --git a/Juick/ViewControllers/DiscussionsController.m b/Juick/ViewControllers/DiscussionsController.m index b8abd3d..1a759a1 100644 --- a/Juick/ViewControllers/DiscussionsController.m +++ b/Juick/ViewControllers/DiscussionsController.m @@ -29,6 +29,7 @@ NSDate *msgDate = [[APIClient sharedClient].dateFormatter dateFromString:lastMsg.timestamp]; self.params = [@{@"to" : [NSString stringWithFormat:@"%.0f", [msgDate timeIntervalSince1970] * 1000]} mutableCopy]; [self setShouldScrollToBottomOnRefresh:NO]; + [self refreshData]; } } diff --git a/Juick/ViewControllers/FeedViewController.m b/Juick/ViewControllers/FeedViewController.m index ce08178..f664f62 100644 --- a/Juick/ViewControllers/FeedViewController.m +++ b/Juick/ViewControllers/FeedViewController.m @@ -46,6 +46,7 @@ self.params = [@{@"before_mid":lastMid} mutableCopy]; } [self setShouldScrollToBottomOnRefresh:NO]; + [self refreshData]; } } diff --git a/Juick/ViewControllers/NewPostViewController.m b/Juick/ViewControllers/NewPostViewController.m index 5a59867..44338bf 100644 --- a/Juick/ViewControllers/NewPostViewController.m +++ b/Juick/ViewControllers/NewPostViewController.m @@ -52,6 +52,7 @@ self.navigationController.navigationItem.rightBarButtonItem.enabled = YES; [self.navigationController popViewControllerAnimated:YES]; [(MessagesViewController *)self.navigationController.visibleViewController setShouldScrollToBottomOnRefresh:YES]; + [(MessagesViewController *)self.navigationController.visibleViewController refreshData]; }]; } } diff --git a/Juick/ViewControllers/ThreadViewController.m b/Juick/ViewControllers/ThreadViewController.m index 44f9e8a..48999b4 100644 --- a/Juick/ViewControllers/ThreadViewController.m +++ b/Juick/ViewControllers/ThreadViewController.m @@ -37,6 +37,7 @@ -(void) loadMore { Message *lastMsg = [self.messages lastObject]; [self setShouldScrollToBottomOnRefresh:lastMsg.rid > 0]; + [self refreshData]; } @end |