@@ -182,6 +182,7 @@ - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)
182
182
NSString *bugTitle = [alertView textFieldAtIndex: 0 ].text ;
183
183
NSArray *logStores = [self .logStores copy ];
184
184
NSMapTable *logStoresToLogMessagesMap = [NSMapTable new ];
185
+ NSDictionary *emailBodyAdditions = [self .emailBodyAdditionsDelegate emailBodyAdditionsForEmailBugReporter: self ];
185
186
186
187
if ([MFMailComposeViewController canSendMail ]) {
187
188
self.mailComposeViewController = [MFMailComposeViewController new ];
@@ -197,7 +198,6 @@ - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)
197
198
if (logStoresToLogMessagesMap.count == logStores.count ) {
198
199
NSMutableString *emailBody = [NSMutableString stringWithFormat: @" %@ \n " , self .prefilledEmailBody];
199
200
200
- NSDictionary *emailBodyAdditions = [self .emailBodyAdditionsDelegate emailBodyAdditionsForEmailBugReporter: self ];
201
201
if (emailBodyAdditions.count > 0 ) {
202
202
for (NSString *emailBodyAdditionKey in emailBodyAdditions.allKeys ) {
203
203
[emailBody appendFormat: @" %@ : %@ \n " , emailBodyAdditionKey, emailBodyAdditions[emailBodyAdditionKey]];
@@ -256,11 +256,17 @@ - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)
256
256
257
257
// Only append logs once all log messages have been retrieved.
258
258
if (logStoresToLogMessagesMap.count == logStores.count ) {
259
- NSMutableString *emailBody = [NSMutableString new ];
259
+ NSMutableString *emailBody = [NSMutableString stringWithFormat: @" %@ \n " , self .prefilledEmailBody];
260
+
261
+ if (emailBodyAdditions.count > 0 ) {
262
+ for (NSString *emailBodyAdditionKey in emailBodyAdditions.allKeys ) {
263
+ [emailBody appendFormat: @" %@ : %@ \n " , emailBodyAdditionKey, emailBodyAdditions[emailBodyAdditionKey]];
264
+ }
265
+ }
266
+
260
267
for (ARKLogStore *logStore in logStores) {
261
268
NSArray *logMessages = [logStoresToLogMessagesMap objectForKey: logStore];
262
-
263
- [emailBody appendFormat: @" %@ \n %@ \n " , self .prefilledEmailBody, [self _recentErrorLogMessagesAsPlainText: logMessages count: self .numberOfRecentErrorLogsToIncludeInEmailBodyWhenAttachmentsAreUnavailable]];
269
+ [emailBody appendFormat: @" \n %@ \n " , [self _recentErrorLogMessagesAsPlainText: logMessages count: self .numberOfRecentErrorLogsToIncludeInEmailBodyWhenAttachmentsAreUnavailable]];
264
270
}
265
271
266
272
NSURL *composeEmailURL = [self _emailURLWithRecipients: @[self .bugReportRecipientEmailAddress] CC: @" " subject: bugTitle body: emailBody];
0 commit comments