From 28331d5ed23029753e0a8c5202e60b02716628cc Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sat, 18 Apr 2015 10:07:25 -0400
Subject: [PATCH] Trigger 'listupdate' event also on response to check-recent request

---
 program/js/app.js |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/program/js/app.js b/program/js/app.js
index b6b4d31..c11ae77 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -7507,7 +7507,7 @@
           this.enable_command('import-messages', !is_multifolder);
           this.enable_command('expand-all', 'expand-unread', 'collapse-all', this.env.threading && this.env.messagecount && !is_multifolder);
 
-          if ((response.action == 'list' || response.action == 'search') && this.message_list) {
+          if (this.message_list) {
             var list = this.message_list, uid = this.env.list_uid;
 
             // highlight message row when we're back from message page
@@ -7520,12 +7520,14 @@
               delete this.env.list_uid;
             }
 
-            this.enable_command('set-listmode', this.env.threads && !is_multifolder);
-            if (list.rowcount > 0)
-              list.focus();
-            this.msglist_select(list);
-            this.triggerEvent('listupdate', { folder:this.env.mailbox, rowcount:list.rowcount });
+            if (response.action == 'list' || response.action == 'search') {
+              this.enable_command('set-listmode', this.env.threads && !is_multifolder);
+              if (list.rowcount > 0)
+                list.focus();
+              this.msglist_select(list);
+            }
 
+            this.triggerEvent('listupdate', { folder:this.env.mailbox, rowcount:list.rowcount });
           }
         }
         else if (this.task == 'addressbook') {

--
Gitblit v1.9.1