fix: expand/collapse animation.

fix: use instance's uri as domain
This commit is contained in:
jk234ert 2021-02-25 20:39:56 +08:00
parent 1024f37d5f
commit ea24ea6514
2 changed files with 10 additions and 1 deletions

View File

@ -220,6 +220,15 @@ extension PickServerCell {
let expandButtonTopConstraintInExpand = expandButton.topAnchor.constraint(equalTo: expandBox.bottomAnchor, constant: 8).priority(.required)
expandConstraints.append(expandButtonTopConstraintInExpand)
// domainLabel.setContentHuggingPriority(.required - 1, for: .vertical)
// domainLabel.setContentCompressionResistancePriority(.required - 1, for: .vertical)
// descriptionLabel.setContentHuggingPriority(.required - 2, for: .vertical)
// descriptionLabel.setContentCompressionResistancePriority(.required - 2, for: .vertical)
domainLabel.setContentHuggingPriority(.required, for: .vertical)
domainLabel.setContentCompressionResistancePriority(.required, for: .vertical)
descriptionLabel.setContentHuggingPriority(.defaultHigh, for: .vertical)
descriptionLabel.setContentCompressionResistancePriority(.defaultHigh, for: .vertical)
NSLayoutConstraint.activate([
// Set background view
bgView.leadingAnchor.constraint(equalTo: contentView.readableContentGuide.leadingAnchor),

View File

@ -39,7 +39,7 @@ extension Mastodon.Entity {
}
public init(instance: Instance) {
self.domain = instance.title
self.domain = instance.uri
self.version = instance.version ?? ""
self.description = instance.shortDescription ?? instance.description
self.language = instance.languages?.first ?? ""