Allow to prevent dialog item selection through listener#139
Merged
Maxr1998 merged 8 commits intoMaxr1998:masterfrom Aug 27, 2023
Merged
Conversation
Maxr1998
requested changes
Jul 7, 2023
Owner
Maxr1998
left a comment
There was a problem hiding this comment.
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
Contributor
Author
|
Fixed CR issues and split into 2 separated PRs |
933d753 to
56b26b0
Compare
Contributor
Author
|
Any news about this? |
Owner
|
Apologies, the last few weeks were rather eventful. I'll review this immediately. |
Maxr1998
requested changes
Aug 27, 2023
Owner
Maxr1998
left a comment
There was a problem hiding this comment.
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]>
Contributor
Author
|
All good 😃 |
Owner
|
Seems like the API schema needs to be updated, I'll do that in a few minutes. |
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.
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: