Search: don't infer filter from results, leave it alone

merge-requests/872/head
Alex Gleason 2021-11-15 15:20:17 -06:00
rodzic 511f1de436
commit e46e217d57
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 0 dodań i 15 usunięć

Wyświetl plik

@ -28,21 +28,7 @@ const toIds = items => {
return ImmutableOrderedSet(items.map(item => item.id));
};
const getResultsFilter = results => {
if (results.accounts.length > 0) {
return 'accounts';
} else if (results.statuses.length > 0) {
return 'statuses';
} else if (results.hashtags.length > 0) {
return 'hashtags';
} else {
return 'accounts';
}
};
const importResults = (state, results) => {
const filter = getResultsFilter(results);
return state.withMutations(state => {
state.set('results', ImmutableMap({
accounts: toIds(results.accounts),
@ -57,7 +43,6 @@ const importResults = (state, results) => {
}));
state.set('submitted', true);
state.set('filter', filter);
});
};