Skip to content

Commit

Permalink
allow user to set isHtml for mail message
Browse files Browse the repository at this point in the history
  • Loading branch information
avgx authored and a-govorovsky committed Nov 5, 2014
1 parent fcbdf62 commit 373fe82
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion IntentKit/Apps/INKMailSheet/INKMailSheet.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ - (void)performAction:(NSString *)action
}

if (params[@"messageBody"]) {
[self.controller setMessageBody:params[@"messageBody"] isHTML:NO];
BOOL isHtml = params[@"isHtml"] ? [params[@"isHtml"] boolValue] : NO;
[self.controller setMessageBody:params[@"messageBody"] isHTML:isHtml];
}

[presentingViewController presentViewController:self.controller animated:YES completion:nil];
Expand Down
1 change: 1 addition & 0 deletions IntentKit/Handlers/INKMailHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

@property (nonatomic, assign) NSString *subject;
@property (nonatomic, assign) NSString *messageBody;
@property (nonatomic, assign) BOOL isHtml;

- (INKActivityPresenter *)sendMailTo:(NSString *)recipient;

Expand Down
4 changes: 4 additions & 0 deletions IntentKit/Handlers/INKMailHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ - (NSDictionary *)argsDictionaryWithDictionary:(NSDictionary *)args {
newArgs[@"messageBody"] = self.messageBody;
}

if (self.isHtml) {
newArgs[@"isHtml"] = [NSNumber numberWithBool:self.isHtml];
}

return [newArgs copy];
}
@end

0 comments on commit 373fe82

Please sign in to comment.