File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -685,8 +685,18 @@ var spinner = new Spinner(opts).spin(ui.spinner[0]);
685685
686686//idle
687687var idle = new Idle ( {
688- onAway : idleStateChange ,
689- onAwayBack : idleStateChange ,
688+ onAway : function ( ) {
689+ idle . isAway = true ;
690+ emitUserStatus ( ) ;
691+ updateOnlineStatus ( ) ;
692+ } ,
693+ onAwayBack : function ( ) {
694+ idle . isAway = false ;
695+ emitUserStatus ( ) ;
696+ updateOnlineStatus ( ) ;
697+ setHaveUnreadChanges ( false ) ;
698+ updateTitleReminder ( ) ;
699+ } ,
690700 awayTimeout : idleTime
691701} ) ;
692702ui . area . codemirror . on ( 'touchstart' , function ( ) {
@@ -713,14 +723,6 @@ function updateTitleReminder() {
713723 }
714724}
715725
716- function idleStateChange ( ) {
717- emitUserStatus ( ) ;
718- updateOnlineStatus ( ) ;
719- if ( ! idle . isAway )
720- setHaveUnreadChanges ( false ) ;
721- updateTitleReminder ( ) ;
722- }
723-
724726function setRefreshModal ( status ) {
725727 $ ( '#refreshModal' ) . modal ( 'show' ) ;
726728 $ ( '#refreshModal' ) . find ( '.modal-body > div' ) . hide ( ) ;
You can’t perform that action at this time.
0 commit comments