Only show collapse button on collapsible statuses
This commit is contained in:
parent
133921848d
commit
ddf5094acf
|
@ -116,15 +116,16 @@ extension StatusCollectionViewCell {
|
|||
statusState.collapsed = false
|
||||
}
|
||||
}
|
||||
collapseButton.isHidden = !statusState.collapsible!
|
||||
contentContainer.setCollapsed(statusState.collapsed!)
|
||||
if statusState.collapsed! {
|
||||
contentContainer.alpha = 0
|
||||
// TODO: is this accessing the image view before the button's been laid out?
|
||||
collapseButton.imageView!.transform = CGAffineTransform(rotationAngle: .pi)
|
||||
collapseButton.imageView!.transform = CGAffineTransform(rotationAngle: 0)
|
||||
collapseButton.accessibilityLabel = NSLocalizedString("Expand Status", comment: "expand status button accessibility label")
|
||||
} else {
|
||||
contentContainer.alpha = 1
|
||||
collapseButton.imageView!.transform = CGAffineTransform(rotationAngle: 0)
|
||||
collapseButton.imageView!.transform = CGAffineTransform(rotationAngle: .pi)
|
||||
collapseButton.accessibilityLabel = NSLocalizedString("Collapse Status", comment: "collapse status button accessibility label")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue