Skip to content

Commit d7bd3f1

Browse files
authored
Merge pull request #6926 from woocommerce/td/6865-remove-unused-stats-version-check-code
Dashboard: remove unused code for stats version check and settings
2 parents f5a3443 + e97ecde commit d7bd3f1

File tree

10 files changed

+0
-359
lines changed

10 files changed

+0
-359
lines changed

Storage/Storage.xcodeproj/project.pbxproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
02C254F22563B12E00A04423 /* ShippingLabelAddress+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02C254EA2563B12E00A04423 /* ShippingLabelAddress+CoreDataProperties.swift */; };
3232
02D200D8253FDEE500840173 /* WooCommerceModelV32toV33.xcmappingmodel in Sources */ = {isa = PBXBuildFile; fileRef = 02D200D7253FDEE500840173 /* WooCommerceModelV32toV33.xcmappingmodel */; };
3333
02D45649231CFB27008CF0A9 /* StatsVersionBannerVisibility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02D45648231CFB27008CF0A9 /* StatsVersionBannerVisibility.swift */; };
34-
02DA64172313C26400284168 /* StatsVersionBySite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02DA64162313C26400284168 /* StatsVersionBySite.swift */; };
3534
02DA64192313C2AA00284168 /* StatsVersion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02DA64182313C2AA00284168 /* StatsVersion.swift */; };
3635
02EAB6D72480A86D00FD873C /* CrashLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02EAB6D62480A86D00FD873C /* CrashLogger.swift */; };
3736
031C1EA127AD3AFE00298699 /* WCPayCharge+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 031C1E9927AD3AFE00298699 /* WCPayCharge+CoreDataClass.swift */; };
@@ -270,7 +269,6 @@
270269
02C254EA2563B12E00A04423 /* ShippingLabelAddress+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ShippingLabelAddress+CoreDataProperties.swift"; sourceTree = "<group>"; };
271270
02D200D7253FDEE500840173 /* WooCommerceModelV32toV33.xcmappingmodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcmappingmodel; path = WooCommerceModelV32toV33.xcmappingmodel; sourceTree = "<group>"; };
272271
02D45648231CFB27008CF0A9 /* StatsVersionBannerVisibility.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatsVersionBannerVisibility.swift; sourceTree = "<group>"; };
273-
02DA64162313C26400284168 /* StatsVersionBySite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatsVersionBySite.swift; sourceTree = "<group>"; };
274272
02DA64182313C2AA00284168 /* StatsVersion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatsVersion.swift; sourceTree = "<group>"; };
275273
02EAB6D62480A86D00FD873C /* CrashLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrashLogger.swift; sourceTree = "<group>"; };
276274
0306C18227BAB09D0070B617 /* Model 65.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Model 65.xcdatamodel"; sourceTree = "<group>"; };
@@ -653,7 +651,6 @@
653651
746A9D1E214078080013F6FF /* TopEarnerStats+CoreDataProperties.swift */,
654652
746A9D1F214078080013F6FF /* TopEarnerStatsItem+CoreDataClass.swift */,
655653
746A9D20214078080013F6FF /* TopEarnerStatsItem+CoreDataProperties.swift */,
656-
02DA64162313C26400284168 /* StatsVersionBySite.swift */,
657654
02DA64182313C2AA00284168 /* StatsVersion.swift */,
658655
02D45648231CFB27008CF0A9 /* StatsVersionBannerVisibility.swift */,
659656
);
@@ -1205,7 +1202,6 @@
12051202
45E462072684BCEE00011BF2 /* StateOfACountry+CoreDataClass.swift in Sources */,
12061203
2619F72525B236E60006DAFF /* TypedPredicates.swift in Sources */,
12071204
CCD2E70725DE9AAA00BD975D /* WooCommerceModelV45toV46.xcmappingmodel in Sources */,
1208-
02DA64172313C26400284168 /* StatsVersionBySite.swift in Sources */,
12091205
26577519243D808B003168A5 /* WooCommerceModelV26toV27.xcmappingmodel in Sources */,
12101206
457E6E8327D8B60F00173F69 /* Order+CoreDataProperties.swift in Sources */,
12111207
CE4FD4492350EB7600A16B31 /* OrderItemTax+CoreDataClass.swift in Sources */,

Storage/Storage/Model/StatsVersionBySite.swift

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

WooCommerce/Classes/Yosemite/AuthenticatedState.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,10 @@ private extension AuthenticatedState {
137137
private extension AuthenticatedState {
138138
func resetServices() {
139139
let resetStoredProviders = AppSettingsAction.resetStoredProviders(onCompletion: nil)
140-
let resetStoredStatsVersionStates = AppSettingsAction.resetStatsVersionStates
141140
let resetOrdersSettings = AppSettingsAction.resetOrdersSettings
142141
let resetProductsSettings = AppSettingsAction.resetProductsSettings
143142
let resetGeneralStoreSettings = AppSettingsAction.resetGeneralStoreSettings
144143
ServiceLocator.stores.dispatch([resetStoredProviders,
145-
resetStoredStatsVersionStates,
146144
resetOrdersSettings,
147145
resetProductsSettings,
148146
resetGeneralStoreSettings])

WooCommerce/WooCommerce.xcodeproj/project.pbxproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@
138138
023EC2E224DA8BAB0021DA91 /* MockProductSKUValidationStoresManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 023EC2E124DA8BAB0021DA91 /* MockProductSKUValidationStoresManager.swift */; };
139139
023EC2E424DA95DB0021DA91 /* ProductInventorySettingsViewModel+VariationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 023EC2E324DA95DB0021DA91 /* ProductInventorySettingsViewModel+VariationTests.swift */; };
140140
023EC2E624DAB1270021DA91 /* EditableProductVariationModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 023EC2E524DAB1270021DA91 /* EditableProductVariationModelTests.swift */; };
141-
02404EE42315151400FF1170 /* MockStatsVersionStoresManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02404EE32315151400FF1170 /* MockStatsVersionStoresManager.swift */; };
142141
0240B3AC230A910C000A866C /* StoreStatsV4ChartAxisHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0240B3AB230A910C000A866C /* StoreStatsV4ChartAxisHelper.swift */; };
143142
0245465B24EE7637004F531C /* ProductFormEventLoggerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0245465A24EE7637004F531C /* ProductFormEventLoggerProtocol.swift */; };
144143
0245465D24EE779D004F531C /* ProductFormEventLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0245465C24EE779D004F531C /* ProductFormEventLogger.swift */; };
@@ -1881,7 +1880,6 @@
18811880
023EC2E124DA8BAB0021DA91 /* MockProductSKUValidationStoresManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockProductSKUValidationStoresManager.swift; sourceTree = "<group>"; };
18821881
023EC2E324DA95DB0021DA91 /* ProductInventorySettingsViewModel+VariationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ProductInventorySettingsViewModel+VariationTests.swift"; sourceTree = "<group>"; };
18831882
023EC2E524DAB1270021DA91 /* EditableProductVariationModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditableProductVariationModelTests.swift; sourceTree = "<group>"; };
1884-
02404EE32315151400FF1170 /* MockStatsVersionStoresManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockStatsVersionStoresManager.swift; sourceTree = "<group>"; };
18851883
0240B3AB230A910C000A866C /* StoreStatsV4ChartAxisHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreStatsV4ChartAxisHelper.swift; sourceTree = "<group>"; };
18861884
0245465A24EE7637004F531C /* ProductFormEventLoggerProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductFormEventLoggerProtocol.swift; sourceTree = "<group>"; };
18871885
0245465C24EE779D004F531C /* ProductFormEventLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductFormEventLogger.swift; sourceTree = "<group>"; };
@@ -5717,7 +5715,6 @@
57175715
B53A569A21123E8E000776C9 /* MockTableView.swift */,
57185716
B509FED421C052D1000076A9 /* MockSupportManager.swift */,
57195717
B555531221B57E8800449E71 /* MockUserNotificationsCenterAdapter.swift */,
5720-
02404EE32315151400FF1170 /* MockStatsVersionStoresManager.swift */,
57215718
3198A1E72694DC7200597213 /* MockKnownReadersProvider.swift */,
57225719
027B8BBE23FE0F850040944E /* MockMediaStoresManager.swift */,
57235720
02A275BF23FE58F6005C560F /* MockImageCache.swift */,
@@ -9671,7 +9668,6 @@
96719668
D802548C26552F41001B2CC1 /* CardPresentModalProcessingTests.swift in Sources */,
96729669
02952B5127808B08008E9BA3 /* StoreStatsPeriodViewModelTests.swift in Sources */,
96739670
B57C5C9F21B80E8300FF82B2 /* SampleError.swift in Sources */,
9674-
02404EE42315151400FF1170 /* MockStatsVersionStoresManager.swift in Sources */,
96759671
02C2756D24F4EEBF00286C04 /* ProductShippingSettingsViewModelTests.swift in Sources */,
96769672
025678052575EA1B009D7E6C /* ProductDetailsCellViewModelTests.swift in Sources */,
96779673
0211252E25773FB00075AD2A /* MockAggregateOrderItem.swift in Sources */,

WooCommerce/WooCommerceTests/Mocks/MockStatsVersionStoresManager.swift

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

Yosemite/Yosemite.xcodeproj/project.pbxproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
02C254FA2563B66600A04423 /* ShippingLabelRefund+ReadOnlyConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02C254F92563B66600A04423 /* ShippingLabelRefund+ReadOnlyConvertible.swift */; };
6868
02C254FE2563C6E500A04423 /* ShippingLabelSettings+ReadOnlyConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02C254FD2563C6E500A04423 /* ShippingLabelSettings+ReadOnlyConvertible.swift */; };
6969
02C255022563C76A00A04423 /* ShippingLabel+ReadOnlyConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02C255012563C76A00A04423 /* ShippingLabel+ReadOnlyConvertible.swift */; };
70-
02DA641B2313D6D200284168 /* AppSettingsStoreTests+StatsVersion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02DA641A2313D6D200284168 /* AppSettingsStoreTests+StatsVersion.swift */; };
7170
02E262BD238CE46A00B79588 /* ShippingSettingsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02E262BC238CE46A00B79588 /* ShippingSettingsService.swift */; };
7271
02E262C0238CE80100B79588 /* StorageShippingSettingsServiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02E262BF238CE80100B79588 /* StorageShippingSettingsServiceTests.swift */; };
7372
02E262C2238CF74D00B79588 /* StorageShippingSettingsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02E262C1238CF74D00B79588 /* StorageShippingSettingsService.swift */; };
@@ -467,7 +466,6 @@
467466
02C254F92563B66600A04423 /* ShippingLabelRefund+ReadOnlyConvertible.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ShippingLabelRefund+ReadOnlyConvertible.swift"; sourceTree = "<group>"; };
468467
02C254FD2563C6E500A04423 /* ShippingLabelSettings+ReadOnlyConvertible.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ShippingLabelSettings+ReadOnlyConvertible.swift"; sourceTree = "<group>"; };
469468
02C255012563C76A00A04423 /* ShippingLabel+ReadOnlyConvertible.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ShippingLabel+ReadOnlyConvertible.swift"; sourceTree = "<group>"; };
470-
02DA641A2313D6D200284168 /* AppSettingsStoreTests+StatsVersion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AppSettingsStoreTests+StatsVersion.swift"; sourceTree = "<group>"; };
471469
02E262BC238CE46A00B79588 /* ShippingSettingsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShippingSettingsService.swift; sourceTree = "<group>"; };
472470
02E262BF238CE80100B79588 /* StorageShippingSettingsServiceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StorageShippingSettingsServiceTests.swift; sourceTree = "<group>"; };
473471
02E262C1238CF74D00B79588 /* StorageShippingSettingsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StorageShippingSettingsService.swift; sourceTree = "<group>"; };
@@ -1350,7 +1348,6 @@
13501348
D87F615D2265B1BC0031A13B /* AppSettingsStoreTests.swift */,
13511349
0202B6982387B01500F3EBE0 /* AppSettingsStoreTests+ProductsFeatureSwitch.swift */,
13521350
312DB64C268BD22B00AA0EE9 /* AppSettingsStoreTests+CardReaderSettings.swift */,
1353-
02DA641A2313D6D200284168 /* AppSettingsStoreTests+StatsVersion.swift */,
13541351
455A931C2747C19300259C7F /* AppSettingsStoreTests+OrdersSettings.swift */,
13551352
458C6DE725ACC554009B300D /* AppSettingsStoreTests+ProductsSettings.swift */,
13561353
B5BC736720D1AA8F00B5B6FA /* AccountStoreTests.swift */,
@@ -2091,7 +2088,6 @@
20912088
B5C9DE272087FF20006B910A /* MockAcountStore.swift in Sources */,
20922089
312DB64D268BD22B00AA0EE9 /* AppSettingsStoreTests+CardReaderSettings.swift in Sources */,
20932090
2614E12D24C745B2007CEE60 /* LeaderboardStatsConverterTests.swift in Sources */,
2094-
02DA641B2313D6D200284168 /* AppSettingsStoreTests+StatsVersion.swift in Sources */,
20952091
026D52C0238235930092AE05 /* ProductVariationStoreTests.swift in Sources */,
20962092
7492FAE1217FB87100ED2C69 /* SettingStoreTests.swift in Sources */,
20972093
45ED4F16239E939A004F1BE3 /* TaxClassStoreTests.swift in Sources */,

Yosemite/Yosemite/Actions/AppSettingsAction.swift

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,6 @@ public enum AppSettingsAction: Action {
3232
///
3333
case resetStoredProviders(onCompletion: ((Error?) -> Void)?)
3434

35-
// MARK: - Stats version
36-
37-
/// Loads the stats version to be shown given the latest app settings associated with the `siteID`
38-
///
39-
case loadInitialStatsVersionToShow(siteID: Int64,
40-
onCompletion: (StatsVersion?) -> Void)
41-
42-
/// Loads whether a stats verion banner should be shown
43-
///
44-
case loadStatsVersionBannerVisibility(banner: StatsVersionBannerVisibility.StatsVersionBanner, onCompletion: (Bool) -> Void)
45-
46-
/// Sets whether a stats version banner should be shown
47-
///
48-
case setStatsVersionBannerVisibility(banner: StatsVersionBannerVisibility.StatsVersionBanner, shouldShowBanner: Bool)
49-
50-
/// Sets the last shown stats version associated with the `siteID`
51-
///
52-
case setStatsVersionLastShown(siteID: Int64,
53-
statsVersion: StatsVersion)
54-
55-
/// Clears all the states related to stats version
56-
///
57-
case resetStatsVersionStates
58-
5935
// MARK: - Orders Settings
6036

6137
/// Loads the orders settings

Yosemite/Yosemite/Model/Mocks/ActionHandlers/MockAppSettingsActionHandler.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ struct MockAppSettingsActionHandler: MockActionHandler {
99

1010
func handle(action: ActionType) {
1111
switch action {
12-
case .loadInitialStatsVersionToShow(let siteId, let onCompletion):
13-
loadInitialStatsVersionToShow(siteId: siteId, onCompletion: onCompletion)
14-
case .setStatsVersionLastShown:
15-
success()
1612
case .loadFeedbackVisibility(let type, let onCompletion):
1713
loadFeedbackVisibility(type: type, onCompletion: onCompletion)
1814
case .setInstallationDateIfNecessary(let date, let onCompletion):
@@ -36,10 +32,6 @@ struct MockAppSettingsActionHandler: MockActionHandler {
3632
}
3733
}
3834

39-
func loadInitialStatsVersionToShow(siteId: Int64, onCompletion: (StatsVersion?) -> Void) {
40-
onCompletion(.v4)
41-
}
42-
4335
func loadFeedbackVisibility(type: FeedbackType, onCompletion: (Result<Bool, Error>) -> Void) {
4436
onCompletion(.success(true))
4537
}

0 commit comments

Comments
 (0)