From c5acbc6c94f5f148d6abb93c3606bd65eaea2798 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 14 Oct 2015 03:45:44 -0400
Subject: [PATCH] Fix bug where message preview was unintentionally reset on check-recent action (#1490563)
---
program/js/app.js | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/program/js/app.js b/program/js/app.js
index 32809d1..5d39a0f 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -2488,22 +2488,23 @@
// removes messages that doesn't exists from list selection array
this.update_selection = function()
{
- var selected = this.message_list.selection,
- rows = this.message_list.rows,
+ var list = this.message_list,
+ selected = list.selection,
+ rows = list.rows,
i, selection = [];
for (i in selected)
if (rows[selected[i]])
selection.push(selected[i]);
- this.message_list.selection = selection;
+ list.selection = selection;
// reset preview frame, if currently previewed message is not selected (has been removed)
try {
var win = this.get_frame_window(this.env.contentframe),
id = win.rcmail.env.uid;
- if (id && $.inArray(id, selection) < 0)
+ if (id && !list.in_selection(id))
this.show_contentframe(false);
}
catch (e) {};
--
Gitblit v1.9.1