From 5028f6e8770c37e7889df249926665cf04fbf884 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Sat, 28 Mar 2015 16:31:36 +1030 Subject: [PATCH] Don't toggle a cell if it's disabled --- ember/app/components/user/notification-grid.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ember/app/components/user/notification-grid.js b/ember/app/components/user/notification-grid.js index 66a6d68bb..cdc981cd3 100644 --- a/ember/app/components/user/notification-grid.js +++ b/ember/app/components/user/notification-grid.js @@ -65,9 +65,11 @@ export default Ember.Component.extend({ var user = this.get('user'); var component = this; cells.forEach(function(cell) { - cell.set('loading', true); - cell.set('enabled', enabled); - user.set('preferences.'+component.preferenceKey(cell.get('type.name'), cell.get('method.name')), enabled); + if (!cell.get('disabled')) { + cell.set('loading', true); + cell.set('enabled', enabled); + user.set('preferences.'+component.preferenceKey(cell.get('type.name'), cell.get('method.name')), enabled); + } }); user.save().then(function() { cells.forEach(function(cell) {