Fix original mastodon bug

This commit is contained in:
KMY 2023-09-19 09:50:28 +09:00
parent df0f35b0d4
commit d9e9f47b8e

View file

@ -70,7 +70,7 @@ export default function search(state = initialState, action) {
map.set('isLoading', false);
});
case SEARCH_EXPAND_REQUEST:
return state.set('type', action.searchType).set('isLoading', true);
return state.set('type', action.searchType); // .set('isLoading', true); // original Mastodon bug
case SEARCH_EXPAND_SUCCESS:
const results = action.searchType === 'hashtags' ? ImmutableOrderedSet(fromJS(action.results.hashtags)) : action.results[action.searchType].map(item => item.id);
return state.updateIn(['results', action.searchType], list => list.union(results)).set('isLoading', false);