Skip to content

Commit

Permalink
Update Debug config
Browse files Browse the repository at this point in the history
  • Loading branch information
afterxleep committed Oct 9, 2024
1 parent f313f7e commit b748004
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DuckDuckGo/DuckPlayer/DuckPlayerLaunchExperiment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ final class DuckPlayerLaunchExperiment: DuckPlayerLaunchExperimentHandling {
lastVideoIDReportedV2 = nil
}

func override() {
func override(control: Bool = false) {
enrollmentDateV2 = Date()
experimentCohortV2 = "experiment"
experimentCohortV2 = control ? "control" : "experiment"
lastDayPixelFiredV2 = nil
lastWeekPixelFiredV2 = nil
lastVideoIDReportedV2 = nil
Expand Down
4 changes: 4 additions & 0 deletions DuckDuckGo/RootDebugViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class RootDebugViewController: UITableViewController {
case resetSyncPromoPrompts = 677
case resetDuckPlayerExperiment = 678
case overrideDuckPlayerExperiment = 679
case overrideDuckPlayerExperimentControl = 680
}

@IBOutlet weak var shareButton: UIBarButtonItem!
Expand Down Expand Up @@ -189,6 +190,9 @@ class RootDebugViewController: UITableViewController {
case .overrideDuckPlayerExperiment:
DuckPlayerLaunchExperiment().override()
ActionMessageView.present(message: "Overriding experiment. You are now in the 'experiment' group. Restart the app to complete")
case .overrideDuckPlayerExperimentControl:
DuckPlayerLaunchExperiment().override(control: true)
ActionMessageView.present(message: "Overriding experiment. You are now in the 'control' group. Restart the app to complete")
}
}
}
Expand Down

0 comments on commit b748004

Please sign in to comment.