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: double calling of delegate #600

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Ans3301
Copy link

@Ans3301 Ans3301 commented Nov 29, 2024

I encountered a bug: I created a custom class that inherited from CropViewController and made an extension for this class, which implemented the CropViewControllerDelegate. When I initialized the delegate in the class constructor with a reference to the class itself, the delegate methods started executing twice. This pull request is a fix.

@TimOliver
Copy link
Owner

Hey @Ans3301! Thanks for the PR!

Hmm, the idea was to in fact allow the delegate and the blocks to execute at the same time in case the user wanted it, so I feel like changing the logic to choose between the two might break expectations for a lot of people. Are you sure you can't fix this some other way?

@Ans3301
Copy link
Author

Ans3301 commented Dec 18, 2024

Hi @TimOliver! Thanks for your response! I understand that this is a breaking change, but I don't quite understand in what use case two calls might be needed. Could you please provide an example of such usage?

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