diff options
Diffstat (limited to 'program/js')
-rw-r--r-- | program/js/app.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/program/js/app.js b/program/js/app.js index 4ed77fb3a..ad91e1fcb 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -232,8 +232,10 @@ function rcube_webmail() this.display_message(this.pending_message[0], this.pending_message[1]); // start interval for keep-alive/recent_check signal - if (this.kepp_alive_interval) - this.kepp_alive_int = setInterval(this.ref+'.'+(this.task=='mail'?'check_for_recent()':'send_keep_alive()'), this.kepp_alive_interval); + if (this.kepp_alive_interval && this.task=='mail' && this.gui_objects.messagelist) + this.kepp_alive_int = setInterval(this.ref+'.check_for_recent()', this.kepp_alive_interval); + else + this.kepp_alive_int = setInterval(this.ref+'.send_keep_alive()', this.kepp_alive_interval); }; |