Skip to content

Commit

Permalink
Merge pull request #372 from wordpress-mobile/issue/371-optional-file…
Browse files Browse the repository at this point in the history
…name-protocol-member-acccessed-without-conformance-check

371 Check conformance on call to optional method
  • Loading branch information
joshheald authored Sep 24, 2021
2 parents 939737f + 07b5f8a commit 7caa1dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Pod/Classes/WPMediaCollectionViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,11 @@ - (void)configureAccessibility
accessibilityLabel = [NSString stringWithFormat:NSLocalizedString(@"Audio, %@", @"Accessibility label for audio items in the media collection view. The parameter is the creation date of the audio."), formattedDate];
break;
case WPMediaTypeOther:
accessibilityLabel = [NSString stringWithFormat:NSLocalizedString(@"Document: %@", @"Accessibility label for other media items in the media collection view. The parameter is the filename file."), [_asset filename]];
if([_asset respondsToSelector:@selector(filename)]) {
accessibilityLabel = [NSString stringWithFormat:NSLocalizedString(@"Document: %@", @"Accessibility label for other media items in the media collection view. The parameter is the filename file."), [_asset filename]];
} else {
accessibilityLabel = [NSString stringWithFormat:NSLocalizedString(@"Document, %@", @"Accessibility label for other media items in the media collection view. The parameter is the creation date of the document."), formattedDate];
}
break;
default:
break;
Expand Down
2 changes: 1 addition & 1 deletion WPMediaPicker.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Pod::Spec.new do |s|
s.name = 'WPMediaPicker'
s.version = '1.7.2'
s.version = '1.7.3-beta.1'

s.summary = 'WPMediaPicker is an iOS controller that allows capture and picking of media assets.'
s.description = <<-DESC
Expand Down

0 comments on commit 7caa1dc

Please sign in to comment.