From: Michael M Slusarz Date: Thu, 24 Dec 2009 06:03:53 +0000 (-0700) Subject: Delete search folders from browser cache when navigating away from them X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=cf2bd4fe1b06e6b20fda21e61597a05b57d0e2d2;p=horde.git Delete search folders from browser cache when navigating away from them --- diff --git a/imp/js/DimpBase.js b/imp/js/DimpBase.js index 5ce9b2f53..11c9194d7 100644 --- a/imp/js/DimpBase.js +++ b/imp/js/DimpBase.js @@ -314,6 +314,7 @@ var DimpBase = { loadMailbox: function(f, opts) { + var need_delete; opts = opts || {}; if (!this.viewport) { @@ -328,6 +329,13 @@ var DimpBase = { $('folderName').update(DIMP.text.loading); $('msgHeader').update(); this.folderswitch = true; + + /* Don't cache results of search folders - since we will need + * to grab new copy if we ever return to it. */ + if (this.isSearch(this.folder)) { + need_delete = this.folder; + } + this.folder = f; if (this.isSearch(f) && @@ -338,6 +346,10 @@ var DimpBase = { } this.viewport.loadView(f, { search: (this.uid ? { imapuid: Number(this.uid) } : null), background: opts.background}); + + if (need_delete) { + this.viewport.deleteView(need_delete); + } }, _createViewPort: function()