From 051e1da193c84cad3ae2de5cf4e3f4f386b42341 Mon Sep 17 00:00:00 2001 From: Abhishek Banthia Date: Fri, 13 Jan 2017 15:16:14 -0500 Subject: [PATCH] Taking care of null characters while entering feedback. --- Clocker/App Feedback/CLAppFeedbackWindowController.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Clocker/App Feedback/CLAppFeedbackWindowController.m b/Clocker/App Feedback/CLAppFeedbackWindowController.m index 4533278..f405e52 100644 --- a/Clocker/App Feedback/CLAppFeedbackWindowController.m +++ b/Clocker/App Feedback/CLAppFeedbackWindowController.m @@ -87,7 +87,9 @@ static CLAppFeedbackWindowController *sharedFeedbackWindow = nil; - (BOOL)didUserEnterFeedback { - if (self.feedbackTextView.string.length == 0) + NSString *cleanedUpString = [self.feedbackTextView.string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; + + if (cleanedUpString.length == 0) { self.informativeText.stringValue = CLFeedbackNotEnteredErrorMessage; [NSTimer scheduledTimerWithTimeInterval:5.0