summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-12-21 13:50:18 +0100
committerAleksander Machniak <alec@alec.pl>2012-12-21 13:50:18 +0100
commit4fe8f923a99b1c1b26e83e3f4b1e557deb131a34 (patch)
tree82a71ebed71d8354d811260b9e67b2f3bd080ee4 /program/js/app.js
parent73899662952a1ae91167c070d2a38136a0200c67 (diff)
Small optimization
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/program/js/app.js b/program/js/app.js
index f1df73cee..6295aee06 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1525,16 +1525,16 @@ function rcube_webmail()
if (this.preview_read_timer)
clearTimeout(this.preview_read_timer);
- var selected = list.get_single_selection() != null;
+ var selected = list.get_single_selection();
- this.enable_command(this.env.message_commands, selected);
+ this.enable_command(this.env.message_commands, selected != null);
if (selected) {
// Hide certain command buttons when Drafts folder is selected
if (this.env.mailbox == this.env.drafts_mailbox)
this.enable_command('reply', 'reply-all', 'reply-list', 'forward', 'forward-attachment', 'forward-inline', false);
// Disable reply-list when List-Post header is not set
else {
- var msg = this.env.messages[list.get_single_selection()];
+ var msg = this.env.messages[selected];
if (!msg.ml)
this.enable_command('reply-list', false);
}