-
Notifications
You must be signed in to change notification settings - Fork 121
Remove not needed functions. #8139
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
Generated by 🚫 dangerJS |
You can test the changes from this Pull Request by:
|
iamgabrielma
left a comment
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.
LGTM. I left 2 questions in the comments 👍
| return UIImage.gridicon(.camera) | ||
| .imageFlippedForRightToLeftLayoutDirection() | ||
| .applyTintColor(.placeholderImage)! | ||
| .withTintColor(.placeholderImage) |
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.
💯
While checking why would we be force-unwrapping this, I saw there's several instances of imageWithTintColor(tintColor)! as well, which has been renamed to withTintColor(_:) and the force-unwrapping can be removed too. Would make sense to fix these as well as part of this PR? Or I can open a new issue otherwise.
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.
Thanks for the hint here @iamgabrielma
We have some references to the WordPressUI function imageWithTintColor, which returns an optional, hence the force unwrapping. I didn't change those, because I didn't know if by doing so we would get any unexpected change (imageWithTintColor has its own implementation that might differ from Apple's). Because of that, I think creating a new issue to check on those is the right course of action here.
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.
Gotcha! I opened a new one here: #8151
| 0366EAE12909A37800B51755 /* JustInTimeMessageAnnouncementCardViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0366EAE02909A37800B51755 /* JustInTimeMessageAnnouncementCardViewModel.swift */; }; | ||
| 036CA6F129229C9E00E4DF4F /* IndefiniteCircularProgressViewStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 036CA6F029229C9E00E4DF4F /* IndefiniteCircularProgressViewStyle.swift */; }; | ||
| 036CA6B9291E8D4B00E4DF4F /* CardPresentModalPreparingReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 036CA6B8291E8D4B00E4DF4F /* CardPresentModalPreparingReader.swift */; }; | ||
| 036CA6F129229C9E00E4DF4F /* IndefiniteCircularProgressViewStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 036CA6F029229C9E00E4DF4F /* IndefiniteCircularProgressViewStyle.swift */; }; |
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.
It would seem we've inadvertently moved this file in the project structure? I can't see any other changes 🤔
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 was automatically done by Xcode when deleting UIImage+TintColor.swift , but please note that the order of the files in that pbxproj field doesn't match the order in the project structure, so I wouldn't worry about it.
Closes: #8119
Description
We remove here some wrapper functions around Apple's
withTintColorbecause we didn't have any added value with them.Testing instructions
Please check that the primary, secondary, and tertiary buttons still have the intended background and border colors. For instance, the 'Next' button in
IssueRefundViewControllerdisplays correctly:RELEASE-NOTES.txtif necessary.