Skip to content

Commit 305eac3

Browse files
committed
Make singleLine and listBackground default values because they are used more often
1 parent 121cc6a commit 305eac3

File tree

8 files changed

+8
-15
lines changed

8 files changed

+8
-15
lines changed

WooCommerce/Classes/ViewRelated/Coupons/CouponListViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ final class CouponListViewController: UIViewController, GhostableViewController
1616
cellClass: TitleAndSubtitleAndStatusTableViewCell.self,
1717
rowsPerSection: Constants.placeholderRowsPerSection,
1818
estimatedRowHeight: Constants.estimatedRowHeight,
19-
separatorStyle: .singleLine))
19+
backgroundColor: .basicBackground))
2020

2121
/// Pull To Refresh Support.
2222
///

WooCommerce/Classes/ViewRelated/Dashboard/MyStore/TopPerformerDataViewController.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ final class TopPerformerDataViewController: UIViewController, GhostableViewContr
2727
///
2828
lazy var ghostTableViewController = GhostTableViewController(options: GhostTableViewOptions(displaysSectionHeader: false,
2929
cellClass: ProductTableViewCell.self,
30-
estimatedRowHeight: Constants.estimatedRowHeight))
30+
estimatedRowHeight: Constants.estimatedRowHeight,
31+
backgroundColor: .basicBackground,
32+
separatorStyle: .none))
3133

3234
/// ResultsController: Loads TopEarnerStats for the current granularity from the Storage Layer
3335
///

WooCommerce/Classes/ViewRelated/Dashboard/Settings/Plugins/PluginListViewController.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ final class PluginListViewController: UIViewController, GhostableViewController
1212
lazy var ghostTableViewController = GhostTableViewController(options: GhostTableViewOptions(cellClass: HeadlineLabelTableViewCell.self,
1313
rowsPerSection: [10],
1414
tableViewStyle: .grouped,
15-
backgroundColor: .listBackground,
16-
separatorStyle: .singleLine,
1715
isScrollEnabled: false))
1816

1917
/// Pull To Refresh Support.

WooCommerce/Classes/ViewRelated/ListSelector/PaginatedListSelectorViewController.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ where DataSource.StorageModel == StorageModel, Model == DataSource.StorageModel.
6363
private let rowType = Cell.self
6464

6565
lazy var ghostTableViewController = GhostTableViewController(options: GhostTableViewOptions(cellClass: Cell.self,
66-
backgroundColor: .listBackground,
6766
separatorStyle: viewProperties.separatorStyle))
6867

6968
private lazy var tableView: UITableView = UITableView(frame: .zero, style: viewProperties.tableViewStyle)

WooCommerce/Classes/ViewRelated/Orders/OrderListViewController.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ final class OrderListViewController: UIViewController, GhostableViewController {
5555
cellClass: OrderTableViewCell.self,
5656
estimatedRowHeight: Settings.estimatedRowHeight,
5757
tableViewStyle: .grouped,
58-
backgroundColor: .listBackground,
59-
separatorStyle: .singleLine,
6058
isScrollEnabled: false))
6159

6260
/// Pull To Refresh Support.

WooCommerce/Classes/ViewRelated/Products/Edit Product/Reviews/ProductReviewsViewController.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ final class ProductReviewsViewController: UIViewController, GhostableViewControl
1111
lazy var ghostTableViewController = GhostTableViewController(options: GhostTableViewOptions(cellClass: ProductReviewTableViewCell.self,
1212
estimatedRowHeight: ProductReviewsDataSource
1313
.Settings
14-
.estimatedRowHeight,
15-
backgroundColor: .listBackground,
16-
separatorStyle: .singleLine))
14+
.estimatedRowHeight))
1715

1816
/// Pull To Refresh Support.
1917
///

WooCommerce/Classes/ViewRelated/ReusableViews/GhostTableViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ struct GhostTableViewOptions {
1616
rowsPerSection: [Int] = [3],
1717
estimatedRowHeight: CGFloat = 44,
1818
tableViewStyle: UITableView.Style = .plain,
19-
backgroundColor: UIColor = .basicBackground,
20-
separatorStyle: UITableViewCell.SeparatorStyle = .none,
19+
backgroundColor: UIColor = .listBackground,
20+
separatorStyle: UITableViewCell.SeparatorStyle = .singleLine,
2121
isScrollEnabled: Bool = true) {
2222
// By just passing the cellClass in the initializer we enforce that the GhostOptions reuseIdentifier is always that of the cellClass
2323
ghostOptions = GhostOptions(displaysSectionHeader: displaysSectionHeader, reuseIdentifier: cellClass.reuseIdentifier, rowsPerSection: rowsPerSection)

WooCommerce/Classes/ViewRelated/Reviews/ReviewsViewController.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ final class ReviewsViewController: UIViewController, GhostableViewController {
1111
@IBOutlet private weak var tableView: UITableView!
1212

1313
lazy var ghostTableViewController = GhostTableViewController(options: GhostTableViewOptions(cellClass: ProductReviewTableViewCell.self,
14-
estimatedRowHeight: Settings.estimatedRowHeight,
15-
backgroundColor: .listBackground,
16-
separatorStyle: .singleLine))
14+
estimatedRowHeight: Settings.estimatedRowHeight))
1715

1816
/// Mark all as read nav bar button
1917
///

0 commit comments

Comments
 (0)