bearnithi / bn-ng-idle

Angular user idle detector service
28 stars 11 forks source link

there's no way to know if user became active after being idle. #1

Closed KalaRaja closed 5 years ago

KalaRaja commented 5 years ago

when user moves mouse or does something such that he is not idle anymore, then the subscription 'res' does not turn false.

bearnithi commented 5 years ago

Try the following code, whenever the user does any event then the idle$ subscribe will get emitted. resetTimer method will reset the timer again.

this.userIdle.startWatching(300).subscribe((res) => {
 });

 this.userIdle.idle$.subscribe((res) => {
      this.userIdle.resetTimer();
 });
ralekeo commented 5 years ago

Property 'idle$' is private and only accessible within class 'BnNgIdleService'

Though I can update it to public, this would not work well for the team

ujaved931 commented 1 year ago

Is there a workaround for this? Since I can't access 'idle$'?