From 6f1df714605cb58d5c26d8dada7e5da6864a431e Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 16 Apr 2010 15:17:02 -0600 Subject: [PATCH] Fix selection list when working with search mailboxes --- imp/js/DimpCore.js | 10 ++++++---- imp/js/ViewPort.js | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/imp/js/DimpCore.js b/imp/js/DimpCore.js index 0de9b124f..a1cf4de16 100644 --- a/imp/js/DimpCore.js +++ b/imp/js/DimpCore.js @@ -138,11 +138,13 @@ var DimpCore = { tmp = {}; if (b.getMetaData('search')) { - s.get('dataob').each(function(r) { - if (!tmp[r.view]) { - tmp[r.view] = []; + s.get('uid').each(function(r) { + var parts = r.split(DIMP.conf.IDX_SEP); + if (tmp[parts[1]]) { + tmp[parts[1]].push(parts[0]); + } else { + tmp[parts[1]] = [ parts[0] ]; } - tmp[r.view].push(r.imapuid); }); } else { tmp[b.getView()] = s.get('uid'); diff --git a/imp/js/ViewPort.js b/imp/js/ViewPort.js index 33d66d00a..4e7975782 100644 --- a/imp/js/ViewPort.js +++ b/imp/js/ViewPort.js @@ -1225,7 +1225,7 @@ var ViewPort = Class.create({ getSelection: function(view) { var buffer = this._getBuffer(view); - return this.createSelection('uid', buffer ? buffer.getAllUIDs() : [], view); + return this.createSelection('uid', buffer ? buffer.getSelected().get('uid') : [], view); }, // vs = (Viewport_Selection | array) A Viewport_Selection object -or- if -- 2.11.0