From 55f2de2d055ca16fec1b1ebc0d1c9ccb0aefe49c Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 21 Dec 2009 22:25:30 -0700 Subject: [PATCH] Fix rownum determination when rownum is originally not in buffer --- imp/js/DimpBase.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/imp/js/DimpBase.js b/imp/js/DimpBase.js index 0487e5bab..12301bf20 100644 --- a/imp/js/DimpBase.js +++ b/imp/js/DimpBase.js @@ -497,13 +497,15 @@ var DimpBase = { var row = this.viewport.getSelection().search({ imapuid: { equal: [ this.uid ] }, view: { equal: [ this.folder ] } }); if (row.size()) { this.rownum = row.get('rownum').first(); - this.viewport.scrollTo(this.rownum, { noupdate: true, top: true }); - offset = this.viewport.currentOffset(); } this.uid = null; - } else if (this.rownum) { - offset = this.rownum - 1; } + + if (this.rownum) { + this.viewport.scrollTo(this.rownum, { noupdate: true, top: true }); + offset = this.viewport.currentOffset(); + } + return offset; }.bind(this), onSlide: this.setMessageListTitle.bind(this) -- 2.11.0