From 9f17d5dffd82ce26d5e45439836c339cc6bd65ab Mon Sep 17 00:00:00 2001 From: CMK Date: Wed, 16 Jun 2021 14:24:19 +0800 Subject: [PATCH] fix: update cell separator line height in pick server scene --- .../Diffiable/Section/PickServerSection.swift | 6 ++-- .../TableViewCell/PickServerCell.swift | 30 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Mastodon/Diffiable/Section/PickServerSection.swift b/Mastodon/Diffiable/Section/PickServerSection.swift index 182c93924..28b1ded3f 100644 --- a/Mastodon/Diffiable/Section/PickServerSection.swift +++ b/Mastodon/Diffiable/Section/PickServerSection.swift @@ -115,11 +115,11 @@ extension PickServerSection { guard let proxiedThumbnail = server.proxiedThumbnail, let url = URL(string: proxiedThumbnail) else { cell.thumbnailImageView.image = placeholderImage - cell.thumbnailActivityIdicator.stopAnimating() + cell.thumbnailActivityIndicator.stopAnimating() return } cell.thumbnailImageView.isHidden = false - cell.thumbnailActivityIdicator.startAnimating() + cell.thumbnailActivityIndicator.startAnimating() cell.thumbnailImageView.af.setImage( withURL: url, @@ -129,7 +129,7 @@ extension PickServerSection { completion: { [weak cell] response in switch response.result { case .success, .failure: - cell?.thumbnailActivityIdicator.stopAnimating() + cell?.thumbnailActivityIndicator.stopAnimating() } } ) diff --git a/Mastodon/Scene/Onboarding/PickServer/TableViewCell/PickServerCell.swift b/Mastodon/Scene/Onboarding/PickServer/TableViewCell/PickServerCell.swift index 8eb0cb771..ca69aef29 100644 --- a/Mastodon/Scene/Onboarding/PickServer/TableViewCell/PickServerCell.swift +++ b/Mastodon/Scene/Onboarding/PickServer/TableViewCell/PickServerCell.swift @@ -60,7 +60,7 @@ class PickServerCell: UITableViewCell { return label }() - let thumbnailActivityIdicator = UIActivityIndicatorView(style: .medium) + let thumbnailActivityIndicator = UIActivityIndicatorView(style: .medium) let thumbnailImageView: UIImageView = { let imageView = UIImageView() @@ -99,7 +99,7 @@ class PickServerCell: UITableViewCell { return button }() - let seperator: UIView = { + let separator: UIView = { let view = UIView() view.backgroundColor = Asset.Colors.Background.systemGroupedBackground.color view.translatesAutoresizingMaskIntoConstraints = false @@ -177,7 +177,7 @@ class PickServerCell: UITableViewCell { thumbnailImageView.isHidden = false thumbnailImageView.af.cancelImageRequest() - thumbnailActivityIdicator.stopAnimating() + thumbnailActivityIndicator.stopAnimating() disposeBag.removeAll() } @@ -203,7 +203,7 @@ extension PickServerCell { containerView.addSubview(domainLabel) containerView.addSubview(checkbox) containerView.addSubview(descriptionLabel) - containerView.addSubview(seperator) + containerView.addSubview(separator) containerView.addSubview(expandButton) @@ -231,13 +231,13 @@ extension PickServerCell { containerView.topAnchor.constraint(equalTo: contentView.topAnchor), containerView.leadingAnchor.constraint(equalTo: contentView.readableContentGuide.leadingAnchor), contentView.readableContentGuide.trailingAnchor.constraint(equalTo: containerView.trailingAnchor), - contentView.bottomAnchor.constraint(equalTo: containerView.bottomAnchor, constant: 1), + contentView.bottomAnchor.constraint(equalTo: containerView.bottomAnchor), // Set bottom separator - seperator.leadingAnchor.constraint(equalTo: containerView.leadingAnchor), - containerView.trailingAnchor.constraint(equalTo: seperator.trailingAnchor), - containerView.topAnchor.constraint(equalTo: seperator.topAnchor), - seperator.heightAnchor.constraint(equalToConstant: 1).priority(.defaultHigh), + separator.leadingAnchor.constraint(equalTo: containerView.leadingAnchor), + containerView.trailingAnchor.constraint(equalTo: separator.trailingAnchor), + containerView.topAnchor.constraint(equalTo: separator.topAnchor), + separator.heightAnchor.constraint(equalToConstant: 1).priority(.defaultHigh), domainLabel.topAnchor.constraint(equalTo: containerView.layoutMarginsGuide.topAnchor), domainLabel.leadingAnchor.constraint(equalTo: containerView.layoutMarginsGuide.leadingAnchor), @@ -272,14 +272,14 @@ extension PickServerCell { containerView.layoutMarginsGuide.bottomAnchor.constraint(equalTo: expandButton.bottomAnchor), ]) - thumbnailActivityIdicator.translatesAutoresizingMaskIntoConstraints = false - thumbnailImageView.addSubview(thumbnailActivityIdicator) + thumbnailActivityIndicator.translatesAutoresizingMaskIntoConstraints = false + thumbnailImageView.addSubview(thumbnailActivityIndicator) NSLayoutConstraint.activate([ - thumbnailActivityIdicator.centerXAnchor.constraint(equalTo: thumbnailImageView.centerXAnchor), - thumbnailActivityIdicator.centerYAnchor.constraint(equalTo: thumbnailImageView.centerYAnchor), + thumbnailActivityIndicator.centerXAnchor.constraint(equalTo: thumbnailImageView.centerXAnchor), + thumbnailActivityIndicator.centerYAnchor.constraint(equalTo: thumbnailImageView.centerYAnchor), ]) - thumbnailActivityIdicator.hidesWhenStopped = true - thumbnailActivityIdicator.stopAnimating() + thumbnailActivityIndicator.hidesWhenStopped = true + thumbnailActivityIndicator.stopAnimating() NSLayoutConstraint.activate(collapseConstraints)