mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 06:39:40 +08:00
Don't toggle a cell if it's disabled
This commit is contained in:
parent
52a7b536c4
commit
5028f6e877
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user