Skip to content
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

- Added dismiss functionality regarding issue 140 #141

Merged
merged 2 commits into from
Dec 17, 2022

Conversation

GerasimosGots
Copy link
Contributor

@GerasimosGots GerasimosGots commented Dec 17, 2022

  • Added functionality for dismissing the spinner when the default dismiss spinner does not work, through view hierarchy #issue_140

Guidelines

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

This commit is regarding issue 140 that I have already opened, It's a suggested solution to the problem that I mentioned. I already use it in my project with success, so I thought we can add it as an extra helping functionality in PowerSpinner library.

The problem was that in some cases the power spinner stays visible and cannot be dismissed.
My proposed solution is an extension function of the parent view, that iterates all the view hierarchy of the current view,
if we find an instance of PowerSpinner view then dismiss it (with the already dismiss functionality).

  • Added two extension functions in PowerSpinnerExtension file, one public and the other private.
  • Added some comments for each function

The usage is fairly easy -> parentView?.dismissPowerSpinner()

Types of changes

What types of changes does your code introduce?

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Preparing a pull request for review

Ensure your change is properly formatted by running:

$ ./gradlew spotlessApply

Please correct any failures before requesting a review.

- Added functionality for dismissing the spinner when the default dismiss spinner does not work, through view hierarchy
- Added some comments
Copy link
Owner

@skydoves skydoves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect! 💯
Thank you for your contribution :)

@skydoves
Copy link
Owner

skydoves commented Dec 17, 2022

Hey @GerasimosGots, before merging this, could you run ./gradlew spotlessApply and ./gradlew apiDump command lines?

@GerasimosGots
Copy link
Contributor Author

Hey @GerasimosGots, before merging this, could you run ./gradlew spotlessApply and ./gradlew apiDump command lines?

Done!

@skydoves skydoves merged commit 7854938 into skydoves:main Dec 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants