File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 7373    } 
7474
7575    handleIdle ( )  { 
76-       window . ipcRenderer . on ( IPC_EVENT_IDLE_TIME ,  ( ev ,  idleTime )  =>  { 
77-         if  ( idleTime  >  this . $rootScope . r . config . minIdleTimeInMs )  { 
76+       window . ipcRenderer . on ( IPC_EVENT_IDLE_TIME ,  ( ev ,  idleTimeInMs )  =>  { 
77+         // don't run if option is not enabled 
78+         if  ( ! this . $rootScope . r . config . isEnableIdleTimeTracking )  { 
79+           this . isIdle  =  false ; 
80+           return ; 
81+         } 
82+         const  minIdleTimeInMs  =  moment . duration ( this . $rootScope . r . config . minIdleTime ) . asMilliseconds ( ) ; 
83+ 
84+         if  ( idleTimeInMs  >  minIdleTimeInMs )  { 
7885          this . isIdle  =  true ; 
7986          this . $rootScope . $broadcast ( this . EV . IS_IDLE ) ; 
8087
8491          if  ( ! this . isIdleDialogOpen )  { 
8592            this . isIdleDialogOpen  =  true ; 
8693            this . Dialogs ( 'WAS_IDLE' ,  { 
87-               initialIdleTime : idleTime , 
88-               minIdleTimeInMs : this . $rootScope . r . config . minIdleTimeInMs , 
94+               initialIdleTime : idleTimeInMs , 
95+               minIdleTimeInMs : minIdleTimeInMs , 
8996            } ) 
9097              . then ( ( )  =>  { 
9198                // if tracked 
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ <h2 class="md-title">
4747  < div > 
4848    < md-switch  ng-model ="vm.settings.isEnableIdleTimeTracking "
4949               aria-label ="Enable idle time tracking "> 
50-       Enable idle time handling
50+       Enable idle time handling (when idle, open dialog on what to track) 
5151    </ md-switch > 
5252  </ div > 
5353
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments