-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Allow to prevent dialog item selection through listener #139
Allow to prevent dialog item selection through listener #139
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.
Thanks for the contribution! I left some comments already to look at. If possible, I'd prefer this PR to be split into two, so one for the badge, and one for the selection handling.
library/src/main/java/de/Maxr1998/modernpreferences/preferences/choice/SelectionItem.kt
Outdated
Show resolved
Hide resolved
library/src/main/java/de/Maxr1998/modernpreferences/preferences/choice/SelectionAdapter.kt
Outdated
Show resolved
Hide resolved
library/src/main/java/de/Maxr1998/modernpreferences/preferences/choice/SelectionAdapter.kt
Outdated
Show resolved
Hide resolved
library/src/main/java/de/Maxr1998/modernpreferences/preferences/choice/SelectionAdapter.kt
Outdated
Show resolved
Hide resolved
...main/java/de/Maxr1998/modernpreferences/preferences/choice/AbstractChoiceDialogPreference.kt
Outdated
Show resolved
Hide resolved
005196d
to
5f150a5
Compare
Fixed CR issues and split into 2 separated PRs |
933d753
to
56b26b0
Compare
Any news about this? |
Apologies, the last few weeks were rather eventful. I'll review this immediately. |
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.
The new shouldSelect
handling looks much better, just a few nitpicks remaining. Otherwise, it's perfect.
...main/java/de/Maxr1998/modernpreferences/preferences/choice/AbstractChoiceDialogPreference.kt
Outdated
Show resolved
Hide resolved
...main/java/de/Maxr1998/modernpreferences/preferences/choice/AbstractChoiceDialogPreference.kt
Outdated
Show resolved
Hide resolved
...main/java/de/Maxr1998/modernpreferences/preferences/choice/AbstractChoiceDialogPreference.kt
Outdated
Show resolved
Hide resolved
…s/choice/AbstractChoiceDialogPreference.kt Co-authored-by: Max Rumpf <[email protected]>
All good 😃 |
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, looking good now!
Seems like the API schema needs to be updated, I'll do that in a few minutes. |
This will allow users to prevent click on specific dialog items
Example:
Screen.Recording.2023-07-06.at.23.37.14.mov
Example use case: make certain items premium only and instead of allowing users to tap them, show a premium upgrade dialog
TODO: