diff --git a/Session/Home/HomeVC.swift b/Session/Home/HomeVC.swift index 9f39aa958..382c2bb0b 100644 --- a/Session/Home/HomeVC.swift +++ b/Session/Home/HomeVC.swift @@ -48,7 +48,7 @@ final class HomeVC: BaseVC, SessionUtilRespondingViewController, UITableViewData private var tableViewTopConstraint: NSLayoutConstraint! private lazy var seedReminderView: SeedReminderView = { - let result = SeedReminderView(hasContinueButton: true, hasSessionShieldIcon: true) + let result = SeedReminderView() result.accessibilityLabel = "Recovery phrase reminder" result.title = NSAttributedString(string: "onboarding_recovery_password_title".localized()) result.subtitle = "onboarding_recovery_password_subtitle".localized() diff --git a/Session/Onboarding/SeedReminderView.swift b/Session/Onboarding/SeedReminderView.swift index bd16adbe2..a46b0a3cc 100644 --- a/Session/Onboarding/SeedReminderView.swift +++ b/Session/Onboarding/SeedReminderView.swift @@ -6,10 +6,7 @@ import SessionUtilitiesKit final class SeedReminderView: UIView { private static let progressBarThickness: CGFloat = 2 - - private let hasContinueButton: Bool - private let hasSessionShieldIcon: Bool - + var title = NSAttributedString(string: "") { didSet { titleLabel.attributedText = title } } var subtitle = "" { didSet { subtitleLabel.text = subtitle } } var delegate: SeedReminderViewDelegate? @@ -47,10 +44,7 @@ final class SeedReminderView: UIView { // MARK: - Lifecycle - init(hasContinueButton: Bool, hasSessionShieldIcon: Bool) { - self.hasContinueButton = hasContinueButton - self.hasSessionShieldIcon = hasSessionShieldIcon - + init() { super.init(frame: CGRect.zero) setUpViewHierarchy() @@ -83,7 +77,6 @@ final class SeedReminderView: UIView { sessionShieldIcon.contentMode = .scaleAspectFill sessionShieldIcon.set(.height, to: 16) sessionShieldIcon.set(.width, to: 14) - sessionShieldIcon.isHidden = !hasSessionShieldIcon let titleContainerView: UIStackView = UIStackView(arrangedSubviews: [titleLabel, sessionShieldIcon, UIView.hStretchingSpacer()]) titleContainerView.axis = .horizontal titleContainerView.spacing = Values.verySmallSpacing @@ -105,10 +98,8 @@ final class SeedReminderView: UIView { // Set up content stack view let contentStackView = UIStackView(arrangedSubviews: [ labelStackView ]) - if hasContinueButton { - contentStackView.addArrangedSubview(UIView.hStretchingSpacer()) - contentStackView.addArrangedSubview(button) - } + contentStackView.addArrangedSubview(UIView.hStretchingSpacer()) + contentStackView.addArrangedSubview(button) contentStackView.axis = .horizontal contentStackView.spacing = 4 contentStackView.alignment = .center