Closed Ajmal0197 closed 3 years ago
Have you tried pausing/resuming the timer when unmounting then mounting screen or coming from background?
Have you tried pausing/resuming the timer when unmounting then mounting screen or coming from background?
Still crashes sometimes even after putting mount/unmount bool in isPlaying.
I think now I am not getting crashes. I hide the countdown component on unmount with a view and then on mount put it back.
{!(appStatus && useFocus && startTimer && showTimer) ? <Text style={{ color: '#fff', fontFamily: 'Poppins-Bold', fontSize: wp('7%') }}>2 minutes : <CountdownCircleTimer isPlaying={true} duration={fullDuration} //change 1800 initialRemainingTime={timer} onComplete={() => { setEnableNext(true); Vibration.vibrate(500) }} colors={[['#3EAE61', 0.33], ['#3EAE61', 0.33], ['#3EAE61']]}> {({ remainingTime, animatedColor }) => ( <Animated.Text style={{ color: '#3EAE61', fontFamily: 'Poppins-SemiBold', fontSize: wp('9%') }}> {moment.utc(remainingTime * 1000).format('mm:ss')} </Animated.Text> )} }
Let me know if you need any additional help on this one.
TypeError: this._listeners[_key] is not a function. (In 'this._listeners[_key]({ value: value })', 'this._listeners[_key]' is undefined)
callListeners AnimatedNode.js:139:6 callListeners AnimatedWithChildren.js:76:4 _updateValue AnimatedValue.js:246:4 animation.start$argument_1 AnimatedValue.js:211:8 onUpdate TimingAnimation.js:144:4 onUpdate
_callTimer JSTimers.js:137:14 callTimers JSTimers.js:387:16 callFunction MessageQueue.js:425:19 guard$argument_0 MessageQueue.js:112:6 __guard MessageQueue.js:373:10 callFunctionReturnFlushedQueue MessageQueue.js:111:4 callFunctionReturnFlushedQueue