From 5858214176a65f84b719a85759513cc26d5e039a Mon Sep 17 00:00:00 2001 From: Scott Hasbrouck Date: Fri, 23 Jan 2015 11:13:11 -0500 Subject: [PATCH] Fixes email subject line Changes email subject line in contentFromMicroblogPost from "Clipper Ships Sail On the Ocean" to "Link from %@", appName --- Overshare Kit/OSKShareableContent.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Overshare Kit/OSKShareableContent.m b/Overshare Kit/OSKShareableContent.m index 84a954f..93f85f9 100644 --- a/Overshare Kit/OSKShareableContent.m +++ b/Overshare Kit/OSKShareableContent.m @@ -125,6 +125,8 @@ + (instancetype)contentFromMicroblogPost:(NSString *)text authorName:(NSString * content.title = [NSString stringWithFormat:@"Post by %@: “%@”", authorName, text]; + NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]; + NSURL *URLforCanonicalURL = nil; if (canonicalURL) { URLforCanonicalURL = [NSURL URLWithString:canonicalURL]; @@ -166,7 +168,7 @@ + (instancetype)contentFromMicroblogPost:(NSString *)text authorName:(NSString * OSKEmailContentItem *emailItem = [[OSKEmailContentItem alloc] init]; emailItem.body = [NSString stringWithFormat:@"“%@”\n\n(Via @%@)\n\n%@ ", text, authorName, canonicalURL]; - emailItem.subject = @"Clipper Ships Sail On the Ocean"; + emailItem.subject = [NSString stringWithFormat:@"Link from %@", appName]; emailItem.attachments = images.copy; content.emailItem = emailItem; @@ -185,7 +187,6 @@ + (instancetype)contentFromMicroblogPost:(NSString *)text authorName:(NSString * OSKLinkBookmarkContentItem *linkBookmarking = [[OSKLinkBookmarkContentItem alloc] init]; linkBookmarking.url = URLforCanonicalURL; linkBookmarking.notes = [NSString stringWithFormat:@"%@\n\n%@", text, canonicalURL]; - NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]; linkBookmarking.tags = @[appName]; linkBookmarking.markToRead = YES; content.linkBookmarkItem = linkBookmarking;