Remove redundant available(iOS 14, *) annotations and checks - #19709
Merged
Conversation
mokagio
commented
Dec 2, 2022
Comment on lines
88
to
+91
| showUpdateSiteIconAlert() | ||
| } | ||
|
|
||
| if #available(iOS 14.0, *) { | ||
| showSiteIconSelectionAlert() | ||
| } else { | ||
| showUpdateSiteIconAlert() | ||
| } | ||
| showSiteIconSelectionAlert() |
Contributor
Author
There was a problem hiding this comment.
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!
Contributor
Contributor
You can test the changes in WordPress from this Pull Request by:
|
Contributor
You can test the changes in Jetpack from this Pull Request by:
|
4 tasks
The app targets iOS 14.0+ making them always true.
mokagio
force-pushed
the
mokagio/remove-available-ios-14
branch
from
December 2, 2022 09:41
6432d92 to
525027e
Compare
This was referenced Dec 5, 2022
crazytonyli
approved these changes
Dec 6, 2022
| return allowedType.conforms(to: requiredType) | ||
| } else { | ||
| return UTTypeConformsTo($0 as CFString, uttype) | ||
| guard let allowedType = UTType($0), let requiredType = UTType(uttype as String) else { |
Contributor
There was a problem hiding this comment.
Nitpick: this let requiredType = UTType(uttype as String) part can be moved outside of the loop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.