Skip to content

Commit 03afa52

Browse files
authored
Performance chart: Replace deprecated plotAreaFrame (#16145)
2 parents 959c8ac + 3b7a05d commit 03afa52

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

RELEASE-NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- [***] Performance improvements for users logging in with WordPress.com accounts [https://github.com/woocommerce/woocommerce-ios/pull/16126]
1010
- [internal] Fix back swipe gesture detection compatibility for iOS26 [https://github.com/woocommerce/woocommerce-ios/pull/16133]
1111
- [internal] POS Modularization: Removed direct ServiceLocator usage within POS by requiring complex Woo app target dependencies to be injected via POS dependency protocols, and moved reusable dependencies to WooFoundation and Yosemite [https://github.com/woocommerce/woocommerce-ios/pull/16132]
12+
- [internal] Replace deprecated code on performance chart [https://github.com/woocommerce/woocommerce-ios/pull/16145]
1213
- [*] Workaround to make custom field decoding more reliable with sites which return incorrectly formatted meta_data for products, variations, and orders. [https://github.com/woocommerce/woocommerce-ios/pull/16141]
1314

1415
23.2

WooCommerce/Classes/ViewRelated/Dashboard/Blaze/BlazeCampaignDashboardViewModel.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,6 @@ private extension BlazeCampaignDashboardViewModel {
344344
self?.updateResults()
345345
}
346346

347-
let productTransformer: (StorageProduct) -> BlazeCampaignProduct = {
348-
BlazeCampaignProduct(storageProduct: $0)
349-
}
350347
productResultsController.onDidChangeContent = { [weak self] in
351348
guard let self else { return }
352349
latestPublishedProduct = productResultsController.fetchedObjects.first

WooCommerce/Classes/ViewRelated/Dashboard/StoreStats/StoreStatsChart.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ struct StoreStatsChart: View {
101101
return
102102
}
103103

104-
let xPosition = location.x - geometry[proxy.plotAreaFrame].origin.x
104+
guard let plotFrame = proxy.plotFrame else {
105+
return
106+
}
107+
let xPosition = location.x - geometry[plotFrame].origin.x
105108
guard let date: Date = proxy.value(atX: xPosition) else {
106109
return
107110
}

0 commit comments

Comments
 (0)