Skip to content

Commit

Permalink
Skip animations when taking screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
weiran committed Aug 18, 2019
1 parent ca4c208 commit 9349b89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Client/Supporting Files/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
if ProcessInfo.processInfo.arguments.contains("disableReviewPrompts") {
ReviewController.disablePrompts = true
}
if ProcessInfo.processInfo.arguments.contains("skipAnimations") {
UIView.setAnimationsEnabled(false)
}
ReviewController.incrementLaunchCounter()
ReviewController.requestReview()
setAppTheme()
Expand Down
5 changes: 3 additions & 2 deletions HackersUITests/HackersUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ import DeviceKit
class HackersUITests: XCTestCase {
func launch(darkTheme: Bool = false) {
let app = XCUIApplication()
setupSnapshot(app)
setupSnapshot(app, waitForAnimations: false)
app.launchArguments = [
"-Theme", darkTheme ? "dark" : "light",
"disableReviewPrompts"
"disableReviewPrompts",
"skipAnimations"
]
app.launch()
}
Expand Down

0 comments on commit 9349b89

Please sign in to comment.