Skip to content

Notify scrollable::Viewport changes#2438

Merged
hecrj merged 1 commit intoiced-rs:masterfrom
Koranir:on-scroll-patch
Sep 10, 2024
Merged

Notify scrollable::Viewport changes#2438
hecrj merged 1 commit intoiced-rs:masterfrom
Koranir:on-scroll-patch

Conversation

@Koranir
Copy link
Contributor

@Koranir Koranir commented May 11, 2024

Fixes #2437.
Closes #2490.

Due to some inherent limitations, the operation can't access the on_scroll function, and so it sets a flag to be consumed on a later event. A better solution might be to give operations access to a Shell, so a message could be triggered manually, but that might not be necessary in this case.

@lufte
Copy link
Contributor

lufte commented May 11, 2024

@Koranir I'm gonna thank you on my behalf because this is good enough for me. Really clever.

I've applied to my fork :)

@hecrj hecrj changed the title Queue on_scroll to be run on operation Notify scrollable::Viewport changes Sep 10, 2024
@hecrj hecrj added this to the 0.13 milestone Sep 10, 2024
@hecrj hecrj added feature New feature or request widget addition labels Sep 10, 2024
Co-authored-by: Daniel Yoon <101683475+Koranir@users.noreply.github.com>
Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

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

Thanks!

I have changed the approach to simply notify any Viewport change on RedrawRequested.

This should also supsersede #2490.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

addition feature New feature or request widget

Projects

None yet

Development

Successfully merging this pull request may close these issues.

on_scroll is not fired when scrolling via operations

3 participants

Comments