Closed Mystery00 closed 8 months ago
Maybe provide a setting to adjust the delay time?
The 600ms delay happens when hiding the button view. This delay ensures the completion of the item animation for selection, preventing the dialog or view from disappearing abruptly. However, this delay is not applied if the dialog or view includes buttons.
The delay occurs before any listeners are triggered and before the dialog closes. A shorter delay might lead to issues, but using the buttons view could be more suitable for your use case. Once the user clicks the positive button, the dialog closes immediately.
I still think that when there is no button displayed, a shorter delay should be provided for a better user experience. But I respect your existing logic. Perhaps a delay of 600 ms provides a better experience on some low-spec devices, ensuring smooth animations without sudden disappearance of dialog boxes. Nonetheless, on high-spec devices, a 600 ms delay after clicking might give the impression that the app is unresponsive. I will attempt to replace certain scenarios with a dialog format to avoid this delay. I also want to express my gratitude to you for your contributions to this project and for taking the time to address my issues.
Can you show me a recording of this scenario? I remember that the duration of selection animations was up to 600 ms, which is why it's set to 600 ms. However, if I'm wrong and it's less, we can reduce it. A minimum would be around 300 ms.
I agree, this delay is too much. The screencasts above clearly show that the app hangs for 600ms
Will be fixed when I find the time, promised!
I will go for a 300ms delay. Looks fine to me with the OptionDialog and CalendarDialog. If you see any issues due to this change, let me know.
https://github.com/maxkeppeler/sheets-compose-dialogs/blob/5b0d0bbf4b9e12451bb0f4a72f33e1645e6d1e11/core/src/main/java/com/maxkeppeker/sheets/core/utils/BaseConstants.kt#L31
https://github.com/maxkeppeler/sheets-compose-dialogs/blob/5b0d0bbf4b9e12451bb0f4a72f33e1645e6d1e11/core/src/main/java/com/maxkeppeker/sheets/core/models/base/BaseBehaviors.kt#L47-L51
After a successful operation, I noticed a delay of approximately 600 milliseconds before the completion callback for the subsequent operation is triggered. I'm curious about the reason behind this design. What is the intended purpose of this delay? I would appreciate an explanation. Thank you!