From: Michael M Slusarz Date: Mon, 10 May 2010 18:46:57 +0000 (-0600) Subject: Fix selecting messages when those messages are not part of the current viewport selection X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=5d491e56cf6d4e26ef6702cf128a3e40a3c3b298;p=horde.git Fix selecting messages when those messages are not part of the current viewport selection --- diff --git a/imp/js/DimpBase.js b/imp/js/DimpBase.js index 50ceeb5c5..fc6c30d00 100644 --- a/imp/js/DimpBase.js +++ b/imp/js/DimpBase.js @@ -2670,14 +2670,9 @@ var DimpBase = { if (opts.vs) { vs = opts.vs; } else if (opts.uid) { - if (opts.mailbox) { - vs = this.viewport.getSelection().search({ imapuid: { equal: [ opts.uid ] }, view: { equal: [ opts.mailbox ] } }); - if (!vs.size() && opts.mailbox != this.folder) { - vs = this.viewport.getSelection(opts.mailbox).search({ imapuid: { equal: [ opts.uid ] } }); - } - } else { - vs = this.viewport.createSelection('dataob', opts.uid); - } + vs = opts.mailbox + ? this.viewport.createSelection('rownum', this.viewport.getAllRows()).search({ imapuid: { equal: [ opts.uid ] }, view: { equal: [ opts.mailbox ] } }) + : this.viewport.createSelection('dataob', opts.uid); } else { vs = this.viewport.getSelected(); }