Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Posts & Pages: Minor fixes #21926

Merged
merged 4 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class AbstractPostListViewController: UIViewController,
/// to the subclass to define this property.
///
var refreshNoResultsViewController: ((NoResultsViewController) -> ())!
let tableViewController = UITableViewController(style: .grouped)
let tableViewController = UITableViewController(style: .plain)
private var reloadTableViewBeforeAppearing = false

@objc var tableView: UITableView {
Expand Down Expand Up @@ -170,7 +170,6 @@ class AbstractPostListViewController: UIViewController,

func configureFilterBar() {
WPStyleGuide.configureFilterTabBar(filterTabBar)
filterTabBar.isLayoutMarginsRelativeArrangement = false
filterTabBar.backgroundColor = .clear
filterTabBar.items = filterSettings.availablePostListFilters()
filterTabBar.addTarget(self, action: #selector(selectedFilterDidChange(_:)), for: .valueChanged)
Expand Down Expand Up @@ -276,17 +275,13 @@ class AbstractPostListViewController: UIViewController,
// MARK: - GUI: No results view logic

func hideNoResultsView() {
setFooterHidden(false)
noResultsViewController.removeFromView()
}

func showNoResultsView() {

guard refreshNoResultsViewController != nil, atLeastSyncedOnce else {
return
}

setFooterHidden(true)
refreshNoResultsViewController(noResultsViewController)

// Only add no results view if it isn't already in the table view
Expand Down Expand Up @@ -401,6 +396,14 @@ class AbstractPostListViewController: UIViewController,
nil
}

func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
0
}

func tableView(_ tableView: UITableView, titleForFooterInSection section: Int) -> String? {
nil
}

func tableViewDidChangeContent(_ tableView: UITableView) {
refreshResults()
}
Expand Down
5 changes: 0 additions & 5 deletions WordPress/Classes/ViewRelated/System/FilterTabBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ class FilterTabBar: UIControl {
}
}

var isLayoutMarginsRelativeArrangement: Bool {
get { stackView.isLayoutMarginsRelativeArrangement }
set { stackView.isLayoutMarginsRelativeArrangement = newValue }
}

private var tabBarHeightConstraint: NSLayoutConstraint! {
didSet {
if let oldValue = oldValue {
Expand Down