Open ClosedBeans opened 2 years ago
Mind to share your code of your component / the part which refreshes the data? That helps a lot to reproduce the issue.
I am also facing the same issue but only for iOS. For Android it is working as expected but for iOS it is not working. Does anyone have any solution for the same?
"name": "@ng-idle/core", "version": "11.1.0", "description": "A module for detecting and responding to the user becoming idle in Angular applications.", "repository": { "type": "git", "url": "git+https://github.com/moribvndvs/ng2-idle.git"
Code:
this.platform.pause.subscribe(async () => { this.updateAppCloseTime(); clearInterval(this.autoSyncInterval); console.log('interval cleared');
idle.setIdle(5); idle.setTimeout(1 * 60); idle.setInterrupts(DEFAULT_INTERRUPTSOURCES); idle.setAutoResume(2);
idle.onTimeoutWarning.subscribe((countdown: number) => { console.log("Timeout warning: ", countdown); });
idle.onTimeout.subscribe(() => { console.log("Timeout"); this.logout(); this.timedOut = true; });
idle.watch(); });
I'm submitting a ... (check one with "x")
Current behavior My component has code to refresh data by using setInterval for every 30 seconds. Which is resetting idle time after every 30 seconds.
Expected behavior It should not count idle time when using js setInterval function.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
@ng-idle version: 2.x 11.0.3
Angular version: 2.x 10.x.x
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] All Browsers
Language: [all | TypeScript X.X | ES6/7 | ES5]
Node:
node --version
=