From 164c7d4d26c47fe61c59404a955cfa059b0e67e5 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 02 Apr 2008 12:26:58 -0400
Subject: [PATCH] #1484317

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

diff --git a/program/js/app.js b/program/js/app.js
index 2d30f30..9f7b7ee 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -202,7 +202,7 @@
           }
 
         if (this.env.messagecount)
-          this.enable_command('select-all', 'select-none', 'sort', 'expunge', true);
+          this.enable_command('select-all', 'select-none', 'expunge', true);
 
         if (this.env.messagecount && (this.env.mailbox==this.env.trash_mailbox || this.env.mailbox==this.env.junk_mailbox))
           this.enable_command('purge', true);
@@ -3500,8 +3500,10 @@
 
       case 'list':
         if (this.env.messagecount)
-          this.enable_command('purge', (this.env.mailbox==this.env.trash_mailbox || this.env.mailbox==this.env.junk_mailbox));
-        this.msglist_select(this.message_list);
+	  this.enable_command('purge', (this.env.mailbox==this.env.trash_mailbox || this.env.mailbox==this.env.junk_mailbox));
+
+	this.enable_command('sort', (this.env.messagecount > 0));
+	this.msglist_select(this.message_list);
 
       case 'expunge':
         this.enable_command('select-all', 'select-none', 'expunge', this.env.messagecount ? true : false);

--
Gitblit v1.9.1