Closed mvn-hungtruong-dn closed 1 year ago
How much of a delay will these debounces cause? What is the debounce time you are using?
@puckey we are using 300ms as a debounce interval.
Why is the extra update after 1 second necessary? Which case does it solve?
@puckey Because even with 300ms, if the user switches fast enough, there will be a chance to reproduce this issue. So 1 second after the user stops switching, we will invalidate again to make sure everything in the notification is up-to-date.
@jspizziri I already notified this in the description. Please review NotificationManager
and BaseAudioPlayer
, if it's OK I will create another PR from this repository instead of my forked repository.
I will also revert the style in both files. 😄
Please review this PR instead. https://github.com/doublesymmetry/KotlinAudio/pull/81
https://developer.android.com/develop/ui/views/notifications#limits Android limits the notification update rate to 5, so if users tap the buttons recursively the notification won't be updated This is the cause of the issue https://github.com/doublesymmetry/react-native-track-player/issues/2021
So I have to limit the debounce of the invalidate call and also invalidate once again after 1s to make sure the UI is up-to-date. I also add the parameter
androidNotificationDebounceInterval
forreact-native-track-player
to use.Please review
NotificationManager
andBaseAudioPlayer
. If it is OK. I will create another PR from this repository instead of my forked repo. Thanks. 😄