mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-31 15:37:01 +00:00
Fix Feedback list repositioning problem in iOS6 when using pull to refresh and new messages coming in
This commit is contained in:
parent
90bab2fc4b
commit
343b8b0abb
@ -137,6 +137,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL)isRefreshingWithNewControl {
|
||||||
|
id refreshClass = NSClassFromString(@"UIRefreshControl");
|
||||||
|
if (refreshClass) {
|
||||||
|
return [self.refreshControl isRefreshing];
|
||||||
|
}
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
- (void)reloadList {
|
- (void)reloadList {
|
||||||
[self startLoadingIndicator];
|
[self startLoadingIndicator];
|
||||||
|
|
||||||
@ -147,12 +155,12 @@
|
|||||||
CGSize contentSize = self.tableView.contentSize;
|
CGSize contentSize = self.tableView.contentSize;
|
||||||
CGPoint contentOffset = self.tableView.contentOffset;
|
CGPoint contentOffset = self.tableView.contentOffset;
|
||||||
|
|
||||||
[self stopLoadingIndicator];
|
|
||||||
|
|
||||||
[self.tableView reloadData];
|
[self.tableView reloadData];
|
||||||
if (contentSize.height > 0 && self.tableView.contentSize.height > contentSize.height)
|
if (contentSize.height > 0 && self.tableView.contentSize.height > contentSize.height && ![self isRefreshingWithNewControl])
|
||||||
[self.tableView setContentOffset:CGPointMake(contentOffset.x, self.tableView.contentSize.height - contentSize.height + contentOffset.y) animated:NO];
|
[self.tableView setContentOffset:CGPointMake(contentOffset.x, self.tableView.contentSize.height - contentSize.height + contentOffset.y) animated:NO];
|
||||||
|
|
||||||
|
[self stopLoadingIndicator];
|
||||||
|
|
||||||
[self.tableView flashScrollIndicators];
|
[self.tableView flashScrollIndicators];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user