From 95804089dbde2b5b1931495fe087f39b5aaf1574 Mon Sep 17 00:00:00 2001 From: Jeena Paradies Date: Wed, 6 Feb 2013 00:23:14 +0100 Subject: [PATCH] allow empty text if location or image is present --- Mac/NewMessageWindow.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mac/NewMessageWindow.m b/Mac/NewMessageWindow.m index 089a907..d98ef78 100644 --- a/Mac/NewMessageWindow.m +++ b/Mac/NewMessageWindow.m @@ -225,7 +225,8 @@ #pragma mark Keyboard delegate methods - (IBAction)sendPost:(NSControl *)control { - if ([[control stringValue] length] <= MESSAGE_MAX_LENGTH && [[control stringValue] length] > 0) { + BOOL emptyIsOk = self.currentLocation || self.imageFilePath; + if (emptyIsOk || ([[control stringValue] length] <= MESSAGE_MAX_LENGTH && [[control stringValue] length] > 0)) { PostModel *post = [[[PostModel alloc] init] autorelease]; post.text = [control stringValue]; post.inReplyTostatusId = inReplyTostatusId;