From be2380fb47b05a222ec5b22deff36d5156a8c943 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Fri, 13 Jan 2006 13:08:41 -0500
Subject: [PATCH] Added labels for LDAP search

---
 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 4ed77fb..ad91e1f 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -232,8 +232,10 @@
       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);
     };
 
 

--
Gitblit v1.9.1