1
0
mirror of https://github.com/flarum/core.git synced 2025-08-03 15:07:53 +02:00

Don't toggle a cell if it's disabled

This commit is contained in:
Toby Zerner
2015-03-28 16:31:36 +10:30
parent 0894368063
commit 4c85e60894

View File

@@ -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) {