From dc60d6782bf40681a1e5096178e7b270fc3950b0 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 14 Apr 2009 17:46:11 -0600 Subject: [PATCH] When navigating away from options, auto-reload page. Ensures we pick up any pref changes made by user. --- imp/js/src/DimpBase.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/imp/js/src/DimpBase.js b/imp/js/src/DimpBase.js index 0e105db86..d4e35fff6 100644 --- a/imp/js/src/DimpBase.js +++ b/imp/js/src/DimpBase.js @@ -187,6 +187,15 @@ var DimpBase = { { var app, f, separator; + /* If switching from options, we need to reload page to pick up any + * prefs changes. */ + if (this.folder === null && + loc != 'options' && + $('appoptions') && + $('appoptions').hasClassName('on')) { + return DimpCore.redirect(DIMP.conf.URI_DIMP_INBOX); + } + if (loc.startsWith('compose:')) { return; } @@ -287,9 +296,9 @@ var DimpBase = { // don't need to parse through them. elt.ancestors().slice(0, -2).find(function(n) { if (n.hasClassName('subfolders')) { - this._toggleSubFolder(n.id.substring(3), 'exp'); + this._toggleSubFolder(n.readAttribute('id').substring(3), 'exp'); } else { - return (n.id == 'foldersSidebar'); + return (n.readAttribute('id') == 'foldersSidebar'); } }, this); }, -- 2.11.0