mirror of
https://github.com/flarum/framework.git
synced 2025-04-25 14:14:03 +08:00
Don't toggle a cell if it's disabled
This commit is contained in:
parent
0894368063
commit
4c85e60894
@ -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