fix(timeline): include category types in server query params
This commit is contained in:
parent
2abc02ccd1
commit
c227dccdd3
1 changed files with 11 additions and 0 deletions
|
|
@ -519,6 +519,17 @@
|
|||
params.set('q', state.filters.searchQuery);
|
||||
}
|
||||
|
||||
// Collect enabled category types for server-side filtering
|
||||
var enabledTypes = [];
|
||||
Object.keys(state.filters.categories).forEach(function(cat) {
|
||||
if (state.filters.categories[cat] && CATEGORY_TYPES[cat]) {
|
||||
enabledTypes = enabledTypes.concat(CATEGORY_TYPES[cat]);
|
||||
}
|
||||
});
|
||||
if (enabledTypes.length > 0) {
|
||||
params.set('types', enabledTypes.join(','));
|
||||
}
|
||||
|
||||
if (cursor) params.set('before', cursor);
|
||||
|
||||
return params;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue