mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
Don't toggle a cell if it's disabled
This commit is contained in:
@@ -65,9 +65,11 @@ export default Ember.Component.extend({
|
|||||||
var user = this.get('user');
|
var user = this.get('user');
|
||||||
var component = this;
|
var component = this;
|
||||||
cells.forEach(function(cell) {
|
cells.forEach(function(cell) {
|
||||||
cell.set('loading', true);
|
if (!cell.get('disabled')) {
|
||||||
cell.set('enabled', enabled);
|
cell.set('loading', true);
|
||||||
user.set('preferences.'+component.preferenceKey(cell.get('type.name'), cell.get('method.name')), enabled);
|
cell.set('enabled', enabled);
|
||||||
|
user.set('preferences.'+component.preferenceKey(cell.get('type.name'), cell.get('method.name')), enabled);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
user.save().then(function() {
|
user.save().then(function() {
|
||||||
cells.forEach(function(cell) {
|
cells.forEach(function(cell) {
|
||||||
|
Reference in New Issue
Block a user