colorfy-software / react-native-modalfy

🥞 Modal citizen of React Native.
https://colorfy-software.gitbook.io/react-native-modalfy
MIT License
1.13k stars 46 forks source link

Need finish callback if noOpenedItems in queueClosingAction functions is true #122

Closed antonRoyenko closed 6 months ago

antonRoyenko commented 1 year ago

Problem

Sometimes in our application, we encounter an issue where the callback doesn't get executed when using the closeAllModals method, even though noOpenedItems === true. However, when calling currentModal from the useModal hook, it's not equal to undefined. I believe this logic is incorrect because the service should complete the callback regardless of noOpenedItems.

Solution

I propose the following solution to this issue: https://github.com/colorfy-software/react-native-modalfy/pull/121