Skip to content

Commit b882be2

Browse files
authored
Merge pull request #6575 from woocommerce/issue/6523-rename-protocol-and-instance
Refactor ReviewsDataSource to adapt to protocol convention naming
2 parents e4706dc + 78330e7 commit b882be2

File tree

11 files changed

+297
-301
lines changed

11 files changed

+297
-301
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ final class ProductReviewsViewController: UIViewController, GhostableViewControl
99
private let viewModel: ProductReviewsViewModel
1010

1111
lazy var ghostTableViewController = GhostTableViewController(options: GhostTableViewOptions(cellClass: ProductReviewTableViewCell.self,
12-
estimatedRowHeight: DefaultReviewsDataSource
12+
estimatedRowHeight: ReviewsDataSource
1313
.Settings
1414
.estimatedRowHeight))
1515

@@ -61,7 +61,7 @@ final class ProductReviewsViewController: UIViewController, GhostableViewControl
6161
init(product: Product) {
6262
self.product = product
6363
viewModel = ProductReviewsViewModel(siteID: product.siteID,
64-
data: DefaultReviewsDataSource(siteID: product.siteID,
64+
data: ReviewsDataSource(siteID: product.siteID,
6565
customizer: ProductReviewsDataSourceCustomizer(product: product)))
6666
super.init(nibName: type(of: self).nibName, bundle: nil)
6767
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import class AutomatticTracks.CrashLogging
66

77
/// The Product Reviews view model used in ProductReviewsViewController
88
final class ProductReviewsViewModel {
9-
private let data: ReviewsDataSource
9+
private let data: ReviewsDataSourceProtocol
1010

1111
var isEmpty: Bool {
1212
return data.isEmpty
@@ -22,7 +22,7 @@ final class ProductReviewsViewModel {
2222

2323
private let siteID: Int64
2424

25-
init(siteID: Int64, data: ReviewsDataSource) {
25+
init(siteID: Int64, data: ReviewsDataSourceProtocol) {
2626
self.siteID = siteID
2727
self.data = data
2828
}

WooCommerce/Classes/ViewRelated/Reviews/DefaultReviewsDataSource.swift

Lines changed: 0 additions & 248 deletions
This file was deleted.

0 commit comments

Comments
 (0)