Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[💡 Feature]: Make the auto dismiss timer configurable #45

Open
mikaoelitiana opened this issue Nov 14, 2024 · 0 comments
Open

[💡 Feature]: Make the auto dismiss timer configurable #45

mikaoelitiana opened this issue Nov 14, 2024 · 0 comments

Comments

@mikaoelitiana
Copy link

Currently, the auto dismiss of ticket scan redeem result is set to 15 seconds

@objc func setupAutoDismiss() {
timer?.invalidate()
print("starting count down")
let delay = 15.0 // seconds
let dismissTimer = Timer(timeInterval: delay, target: self, selector: #selector(dismissVC), userInfo: nil, repeats: false)
RunLoop.main.add(dismissTimer, forMode: .common)
timer = dismissTimer
}

It would be great if the delay value could be changed from the app settings in order to decrease it. On big events with people queuing at the entrance, it can be beneficial to reduce that delay to 2 or 3 seconds.

An additional idea is to also disable auto dismissal when the ticket scan has an error. Currently it is only disabled when ticket status is incomplete :

if let redemptionResponse, redemptionResponse.status == .incomplete {
// we need to ask questions
stopCountDown()
updateQuestionsAndAnswers(redemptionResponse)
showQuestions()
} else {
announceResult(redemptionResponse, nil)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant