mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-07 00:55:28 +00:00
implement updating the filters
This commit is contained in:
parent
846d8a0c8f
commit
a08a4a4e69
@ -357,11 +357,18 @@ Deluge.SideBar = {
|
||||
update: function(filters) {
|
||||
$each(filters, function(states, filter) {
|
||||
if (this.panels.has(filter)) {
|
||||
|
||||
this.updateFilter(filter, states);
|
||||
} else {
|
||||
this.createFilter(filter, states);
|
||||
}
|
||||
}, this);
|
||||
|
||||
// Perform a cleanup of fitlers that aren't enabled
|
||||
$each(this.panels.getKeys(), function(filter) {
|
||||
if (!fitlers.has(filter)) {
|
||||
// We need to remove the panel
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
createFilter: function(filter, states) {
|
||||
@ -405,7 +412,7 @@ Deluge.SideBar = {
|
||||
},
|
||||
|
||||
updateFilter: function(filter, states) {
|
||||
|
||||
this.panels[filter].store.loadData(states);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user