mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-19 04:00:54 +00:00
Merge pull request #272 from facebook/format-cleanup
Code format cleanup
This commit is contained in:
commit
549d40dac0
@ -100,7 +100,7 @@ static BOOL _isInterceptedSelector(SEL sel)
|
|||||||
|
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
#pragma mark ASTableView.
|
#pragma mark ASTableView
|
||||||
|
|
||||||
@interface ASTableView () <ASRangeControllerDelegate, ASDataControllerSource> {
|
@interface ASTableView () <ASRangeControllerDelegate, ASDataControllerSource> {
|
||||||
_ASTableViewProxy *_proxyDataSource;
|
_ASTableViewProxy *_proxyDataSource;
|
||||||
@ -117,7 +117,7 @@ static BOOL _isInterceptedSelector(SEL sel)
|
|||||||
@implementation ASTableView
|
@implementation ASTableView
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
#pragma mark Lifecycle.
|
#pragma mark Lifecycle
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style
|
- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style
|
||||||
{
|
{
|
||||||
@ -141,7 +141,7 @@ static BOOL _isInterceptedSelector(SEL sel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
#pragma mark Overrides.
|
#pragma mark Overrides
|
||||||
|
|
||||||
- (void)setDataSource:(id<UITableViewDataSource>)dataSource
|
- (void)setDataSource:(id<UITableViewDataSource>)dataSource
|
||||||
{
|
{
|
||||||
@ -216,7 +216,9 @@ static BOOL _isInterceptedSelector(SEL sel)
|
|||||||
return visibleNodes;
|
return visibleNodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark Assertions.
|
|
||||||
|
#pragma mark -
|
||||||
|
#pragma mark Assertions
|
||||||
|
|
||||||
- (void)throwUnimplementedException
|
- (void)throwUnimplementedException
|
||||||
{
|
{
|
||||||
@ -235,6 +237,10 @@ static BOOL _isInterceptedSelector(SEL sel)
|
|||||||
[self throwUnimplementedException];
|
[self throwUnimplementedException];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#pragma mark -
|
||||||
|
#pragma mark Editing
|
||||||
|
|
||||||
- (void)insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation
|
- (void)insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation
|
||||||
{
|
{
|
||||||
[_dataController insertSections:sections withAnimationOption:animation];
|
[_dataController insertSections:sections withAnimationOption:animation];
|
||||||
@ -276,7 +282,7 @@ static BOOL _isInterceptedSelector(SEL sel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
#pragma mark Intercepted selectors.
|
#pragma mark Intercepted selectors
|
||||||
|
|
||||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||||
{
|
{
|
||||||
@ -353,14 +359,16 @@ static BOOL _isInterceptedSelector(SEL sel)
|
|||||||
|
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
#pragma mark ASRangeControllerDelegate.
|
#pragma mark ASRangeControllerDelegate
|
||||||
|
|
||||||
- (void)rangeControllerBeginUpdates:(ASRangeController *)rangeController {
|
- (void)rangeControllerBeginUpdates:(ASRangeController *)rangeController
|
||||||
|
{
|
||||||
ASDisplayNodeAssertMainThread();
|
ASDisplayNodeAssertMainThread();
|
||||||
[super beginUpdates];
|
[super beginUpdates];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)rangeControllerEndUpdates:(ASRangeController *)rangeController {
|
- (void)rangeControllerEndUpdates:(ASRangeController *)rangeController
|
||||||
|
{
|
||||||
ASDisplayNodeAssertMainThread();
|
ASDisplayNodeAssertMainThread();
|
||||||
[super endUpdates];
|
[super endUpdates];
|
||||||
}
|
}
|
||||||
|
@ -113,8 +113,8 @@ static const CGFloat kASFlowLayoutControllerRefreshingThreshold = 0.3;
|
|||||||
} else {
|
} else {
|
||||||
ASDisplayNodeAssert(scrollDirection == ASScrollDirectionNone || scrollDirection == ASScrollDirectionUp || scrollDirection == ASScrollDirectionDown, @"Invalid scroll direction");
|
ASDisplayNodeAssert(scrollDirection == ASScrollDirectionNone || scrollDirection == ASScrollDirectionUp || scrollDirection == ASScrollDirectionDown, @"Invalid scroll direction");
|
||||||
|
|
||||||
int backScreens = scrollDirection == ASScrollDirectionUp ? self.tuningParameters.leadingBufferScreenfuls : self.tuningParameters.trailingBufferScreenfuls;
|
CGFloat backScreens = scrollDirection == ASScrollDirectionUp ? self.tuningParameters.leadingBufferScreenfuls : self.tuningParameters.trailingBufferScreenfuls;
|
||||||
int frontScreens = scrollDirection == ASScrollDirectionUp ? self.tuningParameters.trailingBufferScreenfuls : self.tuningParameters.leadingBufferScreenfuls;
|
CGFloat frontScreens = scrollDirection == ASScrollDirectionUp ? self.tuningParameters.trailingBufferScreenfuls : self.tuningParameters.leadingBufferScreenfuls;
|
||||||
|
|
||||||
startIter = ASFindIndexForRange(_nodeSizes, _visibleRangeStartPos, - backScreens * viewportSize.height, _layoutDirection);
|
startIter = ASFindIndexForRange(_nodeSizes, _visibleRangeStartPos, - backScreens * viewportSize.height, _layoutDirection);
|
||||||
endIter = ASFindIndexForRange(_nodeSizes, _visibleRangeEndPos, frontScreens * viewportSize.height, _layoutDirection);
|
endIter = ASFindIndexForRange(_nodeSizes, _visibleRangeEndPos, frontScreens * viewportSize.height, _layoutDirection);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user