Get rid of FollowButton

This commit is contained in:
Nathan Mattes 2023-10-19 13:21:11 +02:00
parent fb0758eac4
commit e640befd9e
2 changed files with 5 additions and 22 deletions

View File

@ -1,20 +0,0 @@
// Copyright © 2023 Mastodon gGmbH. All rights reserved.
import UIKit
import MastodonAsset
public final class FollowButton: UIButton {
public init() {
super.init(frame: .zero)
configureAppearance()
}
required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") }
private func configureAppearance() {
var buttonConfiguration = UIButton.Configuration.filled()
buttonConfiguration.background.cornerRadius = 10
self.configuration = buttonConfiguration
}
}

View File

@ -101,8 +101,11 @@ public final class UserView: UIView {
}() }()
private let followButtonWrapper = UIView() private let followButtonWrapper = UIView()
private let followButton: FollowButton = { private let followButton: UIButton = {
let button = FollowButton() var buttonConfiguration = UIButton.Configuration.filled()
buttonConfiguration.background.cornerRadius = 10
let button = UIButton(configuration: buttonConfiguration)
button.isHidden = true button.isHidden = true
button.translatesAutoresizingMaskIntoConstraints = false button.translatesAutoresizingMaskIntoConstraints = false
button.setContentCompressionResistancePriority(.required, for: .horizontal) button.setContentCompressionResistancePriority(.required, for: .horizontal)