-
Notifications
You must be signed in to change notification settings - Fork 31
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
Remove most imports of UIKit #801
Conversation
if success { | ||
print("Save finished!") | ||
} else { | ||
print("Error saving photo: \(String(describing: error?.localizedDescription))") |
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.
Probably good to call out we should maybe handle this better in the future.
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.
Agreed, OOS here but I've opened an issue: #802
@@ -7,10 +7,9 @@ | |||
// | |||
|
|||
import SwiftUI | |||
import UIKit | |||
|
|||
/// A class responsible for displaying important notifications to the user |
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.
why is this an enum, this makes it a value type instead of a reference type.
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.
See this 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.
Looks good to me--image saving works as intended, and the unused import removal should be guaranteed safe by the compiler. I'm going to hold off on merging until a team member with more significant UI experience has had a chance to look through, though.
Should be good to merge with a rebase + passing CI |
5e22ba5
to
ecb2800
Compare
As far as I can tell the CI is failing due to my fork not having write permission on some resource. The tests themselves appear to be passing. |
ecb2800
to
274709a
Compare
Looks like it. Build and test works fine on my machine--bypassing branch protections to merge w/o passing CI. |
Checklist
- list issue(s) here
Pull Request Information
About this Pull Request
Describe what this PR contains in as much detail as possible
This PR remove almost all of the references to UIKit. Most of these were nothing more than deleting the import, the photo saving required a change. I would appreciate if someone could check I did that correctly!
Screenshots and Videos
In case this PR changes something in the UI, please include screenshots or videos of this new feature
None, any functional change is a bug
Additional Context
Any additional context you'd like to add to help us review this PR
Removing UIKit dependency and being 100% on SwiftUI would allow native Mac support someday.