allow empty text if location or image is present

This commit is contained in:
Jeena Paradies 2013-02-06 00:23:14 +01:00
parent 2f332fb713
commit 95804089db

View file

@ -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;