-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Remove redundant available(iOS 14, *) annotations and checks
#19709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| showUpdateSiteIconAlert() | ||
| } | ||
|
|
||
| if #available(iOS 14.0, *) { | ||
| showSiteIconSelectionAlert() | ||
| } else { | ||
| showUpdateSiteIconAlert() | ||
| } | ||
| showSiteIconSelectionAlert() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this code might possibly show two alerts? if FeatureFlag.siteIconCreator.enabled == false it'll call showUpdateSiteIconAlert() and showSiteIconSelectionAlert().
Is that right?
Or, should we add a return to the successful feature flag check branch?
cc @momo-ozawa who's the last one who touched this code. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's great! 🙌
You can test the changes in WordPress from this Pull Request by:
|
You can test the changes in Jetpack from this Pull Request by:
|
The app targets iOS 14.0+ making them always true.
6432d92 to
525027e
Compare
| return allowedType.conforms(to: requiredType) | ||
| } else { | ||
| return UTTypeConformsTo($0 as CFString, uttype) | ||
| guard let allowedType = UTType($0), let requiredType = UTType(uttype as String) else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: this let requiredType = UTType(uttype as String) part can be moved outside of the loop.
The app targets iOS 14.0+ making them always true.
Testing
If CI builds, we're good.
See also
#available(iOS 13, *)and@available(iOS 13, *)checks #19699@available(iOS 12, *)annotations and checks #19707Regression Notes
RELEASE-NOTES.txtif necessary. N.A.