Skip to content

Commit d1157f9

Browse files
keancrazytonyli
authored andcommitted
Remove the refreshing indicator for posts
1 parent 5d7cbaf commit d1157f9

File tree

1 file changed

+26
-16
lines changed

1 file changed

+26
-16
lines changed

WordPress/Classes/ViewRelated/Post/Controllers/AbstractPostListViewController.swift

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,11 @@ class AbstractPostListViewController: UIViewController,
198198
searchResultsViewController.configure(searchController, self as? InteractivePostViewDelegate)
199199

200200
if #available(iOS 26, *) {
201-
navigationItem.preferredSearchBarPlacement = .integrated
201+
if tabBarController?.isTabBarHidden == false {
202+
navigationItem.preferredSearchBarPlacement = .integratedButton
203+
} else {
204+
navigationItem.preferredSearchBarPlacement = .integrated
205+
}
202206
}
203207

204208
definesPresentationContext = true
@@ -850,28 +854,34 @@ class AbstractPostListViewController: UIViewController,
850854
// MARK: - Misc
851855

852856
private func showRefreshingIndicator() {
853-
guard navigationItem.titleView == nil else {
854-
return
855-
}
857+
// TODO: Design a better way to show it that doesn't affect the navigation bar
856858

857-
let spinner = UIActivityIndicatorView(style: .medium)
858-
spinner.startAnimating()
859-
spinner.tintColor = .secondaryLabel
860-
spinner.transform = .init(scaleX: 0.8, y: 0.8)
859+
if #unavailable(iOS 26) {
860+
guard navigationItem.titleView == nil else {
861+
return
862+
}
861863

862-
let titleView = UILabel()
863-
titleView.text = Strings.updating + "..."
864-
titleView.font = UIFont.preferredFont(forTextStyle: .headline)
865-
titleView.textColor = UIColor.secondaryLabel
864+
let spinner = UIActivityIndicatorView(style: .medium)
865+
spinner.startAnimating()
866+
spinner.tintColor = .secondaryLabel
867+
spinner.transform = .init(scaleX: 0.8, y: 0.8)
866868

867-
let stack = UIStackView(arrangedSubviews: [spinner, titleView])
868-
stack.spacing = 8
869+
let titleView = UILabel()
870+
titleView.text = Strings.updating + "..."
871+
titleView.font = UIFont.preferredFont(forTextStyle: .headline)
872+
titleView.textColor = UIColor.secondaryLabel
869873

870-
navigationItem.titleView = stack
874+
let stack = UIStackView(arrangedSubviews: [spinner, titleView])
875+
stack.spacing = 8
876+
877+
navigationItem.titleView = stack
878+
}
871879
}
872880

873881
private func hideRefreshingIndicator() {
874-
navigationItem.titleView = nil
882+
if #unavailable(iOS 26) {
883+
navigationItem.titleView = nil
884+
}
875885
}
876886

877887
private func setFooterHidden(_ isHidden: Bool) {

0 commit comments

Comments
 (0)