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:
@@ -20,6 +20,8 @@ ASVisibilityViewWillAppear;
|
|||||||
|
|
||||||
ASVisibilityViewDidDisappearImplementation;
|
ASVisibilityViewDidDisappearImplementation;
|
||||||
|
|
||||||
|
ASVisibilitySetVisibilityDepth;
|
||||||
|
|
||||||
ASVisibilityDepthImplementation;
|
ASVisibilityDepthImplementation;
|
||||||
|
|
||||||
- (void)visibilityDepthDidChange
|
- (void)visibilityDepthDidChange
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ ASVisibilityViewWillAppear;
|
|||||||
|
|
||||||
ASVisibilityViewDidDisappearImplementation;
|
ASVisibilityViewDidDisappearImplementation;
|
||||||
|
|
||||||
|
ASVisibilitySetVisibilityDepth;
|
||||||
|
|
||||||
ASVisibilityDepthImplementation;
|
ASVisibilityDepthImplementation;
|
||||||
|
|
||||||
- (void)visibilityDepthDidChange
|
- (void)visibilityDepthDidChange
|
||||||
|
|||||||
@@ -95,11 +95,12 @@ ASVisibilityDidMoveToParentViewController;
|
|||||||
[_node recursivelyFetchData];
|
[_node recursivelyFetchData];
|
||||||
|
|
||||||
if (_parentManagesVisibilityDepth == NO) {
|
if (_parentManagesVisibilityDepth == NO) {
|
||||||
_visibilityDepth = 0;
|
[self setVisibilityDepth:0];
|
||||||
[self visibilityDepthDidChange];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ASVisibilitySetVisibilityDepth;
|
||||||
|
|
||||||
ASVisibilityViewDidDisappearImplementation;
|
ASVisibilityViewDidDisappearImplementation;
|
||||||
|
|
||||||
ASVisibilityDepthImplementation;
|
ASVisibilityDepthImplementation;
|
||||||
|
|||||||
@@ -46,6 +46,16 @@ ASLayoutRangeMode ASLayoutRangeModeForVisibilityDepth(NSUInteger visibilityDepth
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#define ASVisibilitySetVisibilityDepth \
|
||||||
|
- (void)setVisibilityDepth:(NSUInteger)visibilityDepth \
|
||||||
|
{ \
|
||||||
|
if (_visibilityDepth == visibilityDepth) { \
|
||||||
|
return; \
|
||||||
|
} \
|
||||||
|
_visibilityDepth = visibilityDepth; \
|
||||||
|
[self visibilityDepthDidChange]; \
|
||||||
|
}
|
||||||
|
|
||||||
#define ASVisibilityDepthImplementation \
|
#define ASVisibilityDepthImplementation \
|
||||||
- (NSInteger)visibilityDepth \
|
- (NSInteger)visibilityDepth \
|
||||||
{ \
|
{ \
|
||||||
@@ -65,8 +75,7 @@ ASLayoutRangeMode ASLayoutRangeModeForVisibilityDepth(NSUInteger visibilityDepth
|
|||||||
[super viewDidDisappear:animated]; \
|
[super viewDidDisappear:animated]; \
|
||||||
\
|
\
|
||||||
if (_parentManagesVisibilityDepth == NO) { \
|
if (_parentManagesVisibilityDepth == NO) { \
|
||||||
_visibilityDepth = 1; \
|
[self setVisibilityDepth:1]; \
|
||||||
[self visibilityDepthDidChange]; \
|
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,8 +85,7 @@ ASLayoutRangeMode ASLayoutRangeModeForVisibilityDepth(NSUInteger visibilityDepth
|
|||||||
[super viewWillAppear:animated]; \
|
[super viewWillAppear:animated]; \
|
||||||
\
|
\
|
||||||
if (_parentManagesVisibilityDepth == NO) { \
|
if (_parentManagesVisibilityDepth == NO) { \
|
||||||
_visibilityDepth = 0; \
|
[self setVisibilityDepth:0]; \
|
||||||
[self visibilityDepthDidChange]; \
|
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user