Showing 2 of 2 files from the diff.
@@ -364,6 +364,10 @@
Loading
364 | 364 | dispatchGroup.leave() |
|
365 | 365 | return nil |
|
366 | 366 | } |
|
367 | + | dispatchGroup.wait() |
|
368 | + | guard !errorOcurred else { |
|
369 | + | return |
|
370 | + | } |
|
367 | 371 | dispatchGroup.enter() |
|
368 | 372 | detectModerationLabels(image: image, onEvent: onEvent).continueWith {(task) -> Any? in |
|
369 | 373 | guard task.error == nil else { |
@@ -375,6 +379,7 @@
Loading
375 | 379 | dispatchGroup.leave() |
|
376 | 380 | return nil |
|
377 | 381 | } |
|
382 | + | ||
378 | 383 | guard let result = task.result else { |
|
379 | 384 | onEvent(.failed(.unknown(AWSRekognitionErrorMessage.noResultFound.errorDescription, |
|
380 | 385 | AWSRekognitionErrorMessage.noResultFound.recoverySuggestion))) |
@@ -382,6 +387,7 @@
Loading
382 | 387 | dispatchGroup.leave() |
|
383 | 388 | return nil |
|
384 | 389 | } |
|
390 | + | ||
385 | 391 | guard let moderationRekognitionLabels = result.moderationLabels else { |
|
386 | 392 | onEvent(.failed(.network(AWSRekognitionErrorMessage.noResultFound.errorDescription, |
|
387 | 393 | AWSRekognitionErrorMessage.noResultFound.recoverySuggestion))) |
@@ -389,13 +395,15 @@
Loading
389 | 395 | dispatchGroup.leave() |
|
390 | 396 | return nil |
|
391 | 397 | } |
|
398 | + | ||
392 | 399 | unsafeContent = !moderationRekognitionLabels.isEmpty |
|
393 | 400 | dispatchGroup.leave() |
|
394 | 401 | return nil |
|
395 | 402 | } |
|
396 | 403 | dispatchGroup.wait() |
|
404 | + | ||
397 | 405 | if !errorOcurred { |
|
398 | - | onEvent(.completed(IdentifyLabelsResult(labels: allLabels, unsafeContent: unsafeContent))) |
|
406 | + | onEvent(.completed(IdentifyLabelsResult(labels: allLabels, unsafeContent: unsafeContent))) |
|
399 | 407 | } |
|
400 | 408 | } |
|
401 | 409 | } |
Files | Coverage |
---|---|
Amplify | 45.75% |
AmplifyPlugins | 68.32% |
AmplifyTestApp | 44.44% |
AmplifyTestCommon | 25.61% |
AmplifyTests | 91.31% |
Project Totals (874 files) | 66.86% |
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.