From 749630294563ff017f81edb4c091e27502905c2d Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 27 Jan 2016 02:53:12 -0500
Subject: [PATCH] Fix bug where Archive/Junk buttons were not active after page jump with select=all mode (#1490647)

---
 program/js/app.js |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/program/js/app.js b/program/js/app.js
index ba7b711..d454109 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -7111,7 +7111,9 @@
           this.enable_command('expand-all', 'expand-unread', 'collapse-all', this.env.threading && this.env.messagecount);
 
           if ((response.action == 'list' || response.action == 'search') && this.message_list) {
-            this.msglist_select(this.message_list);
+            // trigger 'select' so all dependent actions update its state
+            // e.g. plugins use this event to activate buttons (#1490647)
+            this.message_list.triggerEvent('select');
             this.triggerEvent('listupdate', { folder:this.env.mailbox, rowcount:this.message_list.rowcount });
           }
         }

--
Gitblit v1.9.1