summaryrefslogtreecommitdiff
path: root/web-ui
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui')
-rw-r--r--web-ui/app/js/features/features.js3
-rw-r--r--web-ui/app/js/mail_list/domain/refresher.js6
2 files changed, 7 insertions, 2 deletions
diff --git a/web-ui/app/js/features/features.js b/web-ui/app/js/features/features.js
index e008b5fc..1a00658d 100644
--- a/web-ui/app/js/features/features.js
+++ b/web-ui/app/js/features/features.js
@@ -48,6 +48,9 @@ define([], function() {
isEnabled: function (featureName) {
return ! _.contains(getDisabledFeatures(), featureName);
},
+ isAutoRefreshEnabled: function () {
+ return this.isEnabled('autoRefresh');
+ },
isLogoutEnabled: function () {
return _.has(getDispatcherFeatures(), 'logout');
},
diff --git a/web-ui/app/js/mail_list/domain/refresher.js b/web-ui/app/js/mail_list/domain/refresher.js
index 6f3b1c04..38c9cde5 100644
--- a/web-ui/app/js/mail_list/domain/refresher.js
+++ b/web-ui/app/js/mail_list/domain/refresher.js
@@ -14,7 +14,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
*/
-define(['flight/lib/component', 'page/events'], function(defineComponent, events) {
+define(['flight/lib/component', 'page/events', 'features'], function(defineComponent, events, features) {
'use strict';
return defineComponent(refresher);
@@ -34,7 +34,9 @@ define(['flight/lib/component', 'page/events'], function(defineComponent, events
};
this.after('initialize', function () {
- this.setupRefresher();
+ if (features.isAutoRefreshEnabled()) {
+ this.setupRefresher();
+ }
});
}
}