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

fix: pass DiffEvent to onPush #609

Merged
merged 2 commits into from
Jan 6, 2025
Merged

fix: pass DiffEvent to onPush #609

merged 2 commits into from
Jan 6, 2025

Conversation

Leeeon233
Copy link
Member

No description provided.

@Leeeon233 Leeeon233 requested a review from zxch3n January 6, 2025 07:24
Copy link
Member

@zxch3n zxch3n left a comment

Choose a reason for hiding this comment

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

Why do we need this change?

@@ -2699,18 +2699,24 @@ impl UndoManager {

/// Set the listener for push events.
/// The listener will be called when a new undo/redo item is pushed into the stack.
pub fn set_on_push(&mut self, on_push: Option<OnPush>) {
Copy link
Member

Choose a reason for hiding this comment

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

Users should be able to remove the on_push listener

Copy link
Member Author

Choose a reason for hiding this comment

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

Ohhh

}

/// Set the listener for pop events.
/// The listener will be called when an undo/redo item is popped from the stack.
pub fn set_on_pop(&mut self, on_pop: Option<OnPop>) {
Copy link
Member

Choose a reason for hiding this comment

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

same

@Leeeon233 Leeeon233 merged commit ca51a78 into main Jan 6, 2025
1 check passed
@Leeeon233 Leeeon233 deleted the fix-onPush-params branch January 6, 2025 08:08
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