mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
[ASRelativeLayoutSpec] Fix ASRelatativeLayoutSpec behavior for ASRelativeLayoutSpecPositionStart (#2393)
* Fix ASRelatativeLayoutSpec behavior for ASRelativeLayoutSpecPositionStart * Add updated images for snapshot tests
This commit is contained in:
committed by
Adlai Holler
parent
5a8d0037ec
commit
ba80b83695
@@ -58,21 +58,19 @@
|
||||
|
||||
- (ASRelativeLayoutSpecPosition)horizontalPositionFromCenteringOptions:(ASCenterLayoutSpecCenteringOptions)centeringOptions
|
||||
{
|
||||
BOOL centerX = (centeringOptions & ASCenterLayoutSpecCenteringX) != 0;
|
||||
if (centerX) {
|
||||
if ((centeringOptions & ASCenterLayoutSpecCenteringX) != 0) {
|
||||
return ASRelativeLayoutSpecPositionCenter;
|
||||
} else {
|
||||
return ASRelativeLayoutSpecPositionStart;
|
||||
return ASRelativeLayoutSpecPositionNone;
|
||||
}
|
||||
}
|
||||
|
||||
- (ASRelativeLayoutSpecPosition)verticalPositionFromCenteringOptions:(ASCenterLayoutSpecCenteringOptions)centeringOptions
|
||||
{
|
||||
BOOL centerY = (centeringOptions & ASCenterLayoutSpecCenteringY) != 0;
|
||||
if (centerY) {
|
||||
if ((centeringOptions & ASCenterLayoutSpecCenteringY) != 0) {
|
||||
return ASRelativeLayoutSpecPositionCenter;
|
||||
} else {
|
||||
return ASRelativeLayoutSpecPositionStart;
|
||||
return ASRelativeLayoutSpecPositionNone;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user