forked from 0x2620/pandora
don't request lists twice: load in folders, then update menu
This commit is contained in:
parent
fbbda1ed61
commit
ddef87afd3
2 changed files with 17 additions and 40 deletions
|
|
@ -150,12 +150,17 @@ pandora.ui.folderList = function(id, section) {
|
|||
], operator: '&'};
|
||||
} else if (id == 'featured') {
|
||||
query = {conditions: [
|
||||
{key: 'status', value: 'featured', operator: '='} // fixme: '==' performs better
|
||||
{key: 'status', value: 'featured', operator: '='}
|
||||
], operator: '&'};
|
||||
}
|
||||
return pandora.api['find' + folderItems](Ox.extend(data, {
|
||||
query: query
|
||||
}), callback);
|
||||
}), function(result) {
|
||||
if (Ox.isArray(result.data.items)) {
|
||||
pandora.$ui.mainMenu.updateLists(id, result.data.items);
|
||||
}
|
||||
callback(result);
|
||||
});
|
||||
};
|
||||
} else {
|
||||
columns = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue