Fix selecting messages when those messages are not part of the current viewport selection
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 10 May 2010 18:46:57 +0000 (12:46 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 10 May 2010 18:47:50 +0000 (12:47 -0600)
imp/js/DimpBase.js

index 50ceeb5..fc6c30d 100644 (file)
@@ -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();
         }