mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Add setVisibilityDepth setter.
This commit is contained in:
@@ -46,6 +46,16 @@ ASLayoutRangeMode ASLayoutRangeModeForVisibilityDepth(NSUInteger visibilityDepth
|
||||
|
||||
@end
|
||||
|
||||
#define ASVisibilitySetVisibilityDepth \
|
||||
- (void)setVisibilityDepth:(NSUInteger)visibilityDepth \
|
||||
{ \
|
||||
if (_visibilityDepth == visibilityDepth) { \
|
||||
return; \
|
||||
} \
|
||||
_visibilityDepth = visibilityDepth; \
|
||||
[self visibilityDepthDidChange]; \
|
||||
}
|
||||
|
||||
#define ASVisibilityDepthImplementation \
|
||||
- (NSInteger)visibilityDepth \
|
||||
{ \
|
||||
@@ -65,8 +75,7 @@ ASLayoutRangeMode ASLayoutRangeModeForVisibilityDepth(NSUInteger visibilityDepth
|
||||
[super viewDidDisappear:animated]; \
|
||||
\
|
||||
if (_parentManagesVisibilityDepth == NO) { \
|
||||
_visibilityDepth = 1; \
|
||||
[self visibilityDepthDidChange]; \
|
||||
[self setVisibilityDepth:1]; \
|
||||
} \
|
||||
}
|
||||
|
||||
@@ -76,8 +85,7 @@ ASLayoutRangeMode ASLayoutRangeModeForVisibilityDepth(NSUInteger visibilityDepth
|
||||
[super viewWillAppear:animated]; \
|
||||
\
|
||||
if (_parentManagesVisibilityDepth == NO) { \
|
||||
_visibilityDepth = 0; \
|
||||
[self visibilityDepthDidChange]; \
|
||||
[self setVisibilityDepth:0]; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user