diff --git a/dydx/dydxPresenters/dydxPresenters/_v4/Rating/dydxRateAppViewBuilder.swift b/dydx/dydxPresenters/dydxPresenters/_v4/Rating/dydxRateAppViewBuilder.swift index 419a38aa2..f814e939d 100644 --- a/dydx/dydxPresenters/dydxPresenters/_v4/Rating/dydxRateAppViewBuilder.swift +++ b/dydx/dydxPresenters/dydxPresenters/_v4/Rating/dydxRateAppViewBuilder.swift @@ -62,7 +62,7 @@ private class dydxRateAppViewBuilderPresenter: HostedViewPresenter= 8 || transfersCreatedSinceLastPrompt.count >= 2 || ordersCreatedSinceLastPrompt.count >= 8)) || (!hasEverConnectedWallet && uniqueDayAppOpensCount >= 4) if shouldPrompt { promptForRating() - reset() } } diff --git a/dydx/dydxStateManager/dydxStateManager/Rating/dydxRatingService.swift b/dydx/dydxStateManager/dydxStateManager/Rating/dydxRatingService.swift index f7df25b33..2d7c51881 100644 --- a/dydx/dydxStateManager/dydxStateManager/Rating/dydxRatingService.swift +++ b/dydx/dydxStateManager/dydxStateManager/Rating/dydxRatingService.swift @@ -17,7 +17,7 @@ public protocol dydxRatingProtocol { func orderCreated(orderId: String, orderCreatedTimestampMillis: TimeInterval) func transferCreated(transferId: String, transferCreatedTimestampMillis: TimeInterval) func capturedScreenshotOrShare() - func disablePrompting() + func disablePreprompting() func promptForRating() func tryPromptForRating() diff --git a/dydx/dydxStateManager/dydxStateManagerTests/dydxPointsRatingTests.swift b/dydx/dydxStateManager/dydxStateManagerTests/dydxPointsRatingTests.swift index 8f3fa5073..678048e13 100644 --- a/dydx/dydxStateManager/dydxStateManagerTests/dydxPointsRatingTests.swift +++ b/dydx/dydxStateManager/dydxStateManagerTests/dydxPointsRatingTests.swift @@ -15,9 +15,10 @@ private class TestPointsRating: dydxPointsRating { var promptWasReached: Bool = false override func promptForRating() { + guard !shouldStopPreprompting else { return } promptWasReached = true + reset() } - } final class dydxPointsRatingTests: XCTestCase { @@ -62,7 +63,7 @@ final class dydxPointsRatingTests: XCTestCase { XCTAssertEqual(testPointRating.promptWasReached, false) } - func testConnectedWalletAndMultipleAppLaunchesAndDisablePrompting() { + func testConnectedWalletAndMultipleAppLaunchesAndDisablePreprompting() { testPointRating.connectedWallet() for i in 1...8 { Thread.sleep(forTimeInterval: testPointRating.secondsInADay) @@ -80,7 +81,7 @@ final class dydxPointsRatingTests: XCTestCase { } testPointRating.promptWasReached = false - testPointRating.disablePrompting() + testPointRating.disablePreprompting() for i in 1...8 { Thread.sleep(forTimeInterval: testPointRating.secondsInADay) testPointRating.launchedApp() diff --git a/dydxV4/dydxV4.xcodeproj/xcshareddata/xcschemes/dydxV4.xcscheme b/dydxV4/dydxV4.xcodeproj/xcshareddata/xcschemes/dydxV4.xcscheme index bbf6cc59c..9ad29e3e4 100644 --- a/dydxV4/dydxV4.xcodeproj/xcshareddata/xcschemes/dydxV4.xcscheme +++ b/dydxV4/dydxV4.xcodeproj/xcshareddata/xcschemes/dydxV4.xcscheme @@ -205,19 +205,19 @@ + isEnabled = "YES"> + isEnabled = "YES"> + isEnabled = "NO"> + isEnabled = "NO">