Compare commits
No commits in common. "0c0180264edc55f81b2440dbee19096b1dafdb72" and "6f51f321f626e4931431584a56649c915339c962" have entirely different histories.
0c0180264e
...
6f51f321f6
|
@ -161,15 +161,7 @@ class ProfileViewController: UIViewController, StateRestorableViewController {
|
||||||
// if old doesn't exist, we're selecting the initial view controller, so moving the header around isn't necessary
|
// if old doesn't exist, we're selecting the initial view controller, so moving the header around isn't necessary
|
||||||
new.initialHeaderMode = .createView
|
new.initialHeaderMode = .createView
|
||||||
new.view.translatesAutoresizingMaskIntoConstraints = false
|
new.view.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addChild(new)
|
embedChild(new)
|
||||||
view.addSubview(new.view)
|
|
||||||
NSLayoutConstraint.activate([
|
|
||||||
new.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
new.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
new.view.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
new.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
new.didMove(toParent: self)
|
|
||||||
self.currentIndex = index
|
self.currentIndex = index
|
||||||
state = .idle
|
state = .idle
|
||||||
completion?(true)
|
completion?(true)
|
||||||
|
|
|
@ -26,7 +26,6 @@ class StatusCardView: UIView {
|
||||||
private var isGrayscale = false
|
private var isGrayscale = false
|
||||||
|
|
||||||
private var hStack: UIStackView!
|
private var hStack: UIStackView!
|
||||||
private var vStack: UIStackView!
|
|
||||||
private var titleLabel: UILabel!
|
private var titleLabel: UILabel!
|
||||||
private var descriptionLabel: UILabel!
|
private var descriptionLabel: UILabel!
|
||||||
private var domainLabel: UILabel!
|
private var domainLabel: UILabel!
|
||||||
|
@ -71,7 +70,7 @@ class StatusCardView: UIView {
|
||||||
domainLabel.numberOfLines = 1
|
domainLabel.numberOfLines = 1
|
||||||
domainLabel.textColor = .tintColor
|
domainLabel.textColor = .tintColor
|
||||||
|
|
||||||
vStack = UIStackView(arrangedSubviews: [
|
let vStack = UIStackView(arrangedSubviews: [
|
||||||
titleLabel,
|
titleLabel,
|
||||||
descriptionLabel,
|
descriptionLabel,
|
||||||
domainLabel,
|
domainLabel,
|
||||||
|
@ -189,13 +188,6 @@ class StatusCardView: UIView {
|
||||||
} else {
|
} else {
|
||||||
domainLabel.isHidden = true
|
domainLabel.isHidden = true
|
||||||
}
|
}
|
||||||
|
|
||||||
let titleHeight = titleLabel.isHidden ? 0 : titleLabel.sizeThatFits(CGSize(width: titleLabel.bounds.width, height: UIView.layoutFittingCompressedSize.height)).height
|
|
||||||
let descriptionHeight = descriptionLabel.isHidden ? 0 : descriptionLabel.sizeThatFits(CGSize(width: descriptionLabel.bounds.width, height: UIView.layoutFittingCompressedSize.height)).height
|
|
||||||
let domainLabel = domainLabel.isHidden ? 0 : domainLabel.sizeThatFits(CGSize(width: domainLabel.bounds.width, height: UIView.layoutFittingCompressedSize.height)).height
|
|
||||||
if titleHeight + descriptionHeight + domainLabel > vStack.bounds.height {
|
|
||||||
descriptionLabel.isHidden = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func loadBlurHash() {
|
private func loadBlurHash() {
|
||||||
|
|
Loading…
Reference in New Issue