Browse Source

Disable feedback reporting in debug builds.

pull/113/head
Abhishek Banthia 3 years ago
parent
commit
deba873edc
  1. 10
      Clocker/Preferences/App Feedback/AppFeedbackWindowController.swift

10
Clocker/Preferences/App Feedback/AppFeedbackWindowController.swift

@ -225,13 +225,19 @@ class AppFeedbackWindowController: NSWindowController {
var firebaseDBReference: DatabaseReference! var firebaseDBReference: DatabaseReference!
private func sendDataToFirebase(feedbackInfo info: [String: String]) { private func sendDataToFirebase(feedbackInfo info: [String: String]) {
#if DEBUG
Logger.info("Sending a feedback in Debug builds will lead to a no-op")
#endif
guard let identifier = serialNumber else { guard let identifier = serialNumber else {
assertionFailure("Serial Identifier was unexpectedly nil") assertionFailure("Serial Identifier was unexpectedly nil")
return return
} }
firebaseDBReference = Database.database().reference() #if RELEASE
firebaseDBReference.child("Feedback").child(identifier).setValue(info) firebaseDBReference = Database.database().reference()
firebaseDBReference.child("Feedback").child(identifier).setValue(info)
#endif
} }
private func showSucccessOnSendingInfo() { private func showSucccessOnSendingInfo() {

Loading…
Cancel
Save