-
Notifications
You must be signed in to change notification settings - Fork 32
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
refactor(neon): unify file dialog capabilities #816
Conversation
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 should be done differently. I would prefer if the platforms have a method pickFile
or something like that and then each platform can implement it in their way.
Right now you would need to just move the first part to Android and the second part to Linux.
@Leptopoda what do you think?
To clarify: The problem here is not wether a feature is available or not, but how we implement it |
I disagree. We could also just provide a default implementation in |
I agree that we could change the naming behind it as we don't want to check whether a platform can use file dialog but rather whether it should use it because of #8 (which we could also mention in the doc comment). |
Sure, I'm against duplicating the relevant code. All platforms support this feature in one way or another, so NeonPlatform should indicate which method should be used. We could model it using an enum or another method if there is something better. |
Can you give an example? I can't imagine how this would be any different. |
@provokateurin bump :) I mean the doc comment in the platform can also mention the utility function. |
I would prefer if the current method was split into two methods (both not exported) and then the platform implementations just call the one they need. I really dislike using the detection logic outside of the platform to decide which method should be used. |
Ok let's just rebase and merge this and I will come up with something later. We will likely encounter this problem in the future again, so solving it properly would be nice. |
Signed-off-by: Christian Badelt <[email protected]> Signed-off-by: Nikolas Rimikis <[email protected]>
Fixes #785
Ios support (#755 , #754 ) needs to reimplement this