-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Refactor, Fixes, and functionality to avoid processing nested scroll events on internal webview elements scrolls #8
Conversation
… and improvements
…nd horizontal scrolls, also, update readme
val y = event.getY(activePointerIndex) | ||
val x = event.getX(activePointerIndex) | ||
val deltaY: Float = initialY!! - y | ||
val deltaX: Float = initialX!! - x |
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.
Could we have a concurrency issue here?
I mean, initialX for example could be nullable. To avoid a possible problem could we store in this method these two coordinates and use them instead using initialX/Y? Just to be sure these two values couldnt be null any time in this instance
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.
It shouldn't because all class methods should be always executed from main thread (All are related with touch events processing or scrolls performed that will be sequentially invoked).
In any case it would be clear and we won't need the !!. I'm applying it --> d629d4c
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.
TOP 🚀
🎟️ Jira tickets
ANDROID-13326
ANDROID-11710
🥅 What's the goal?
I decided to revert the "helper" approach to extract to an specific file code extracted from NestedScrollView support library code, this was leading to issues due methods not calling directly WebView methods (Specially all the ones related with NestedScrollingChild3 interface implementation). So I just added this directly to the NestedScrollWebView class, identifying support library code with an specific comment block (trying to keep it as unaltered as possible for future updates).
Fixed also an issue where scroll was maintained after navigating to a new page (ANDROID-11710) -->
Record_2023-05-11-10-14-24.mp4
Record_2023-05-24-19-03-54.mp4
Record_2023-05-24-19-02-56.mp4