diff --git a/app/javascript/mastodon/features/explore/results.js b/app/javascript/mastodon/features/explore/results.js index 27e8aaa4f2106f5ae777ee2ef2642f64b2c275ce..ff900de089ee0e46e2f2a38450e20b6d3d0adc39 100644 --- a/app/javascript/mastodon/features/explore/results.js +++ b/app/javascript/mastodon/features/explore/results.js @@ -104,7 +104,7 @@ class Results extends React.PureComponent { </div> <div className='explore__search-results'> - {isLoading ? (<LoadingIndicator />) : filteredResults} + {isLoading ? <LoadingIndicator /> : filteredResults} </div> </React.Fragment> ); diff --git a/app/javascript/mastodon/reducers/search.js b/app/javascript/mastodon/reducers/search.js index 23bbe4d99570111cd96593aa49fd5682cc1153fd..7dceac6b93f4e335a15b2f7843bbb6fca532d840 100644 --- a/app/javascript/mastodon/reducers/search.js +++ b/app/javascript/mastodon/reducers/search.js @@ -41,7 +41,10 @@ export default function search(state = initialState, action) { case COMPOSE_DIRECT: return state.set('hidden', true); case SEARCH_FETCH_REQUEST: - return state.set('isLoading', true); + return state.withMutations(map => { + map.set('isLoading', true); + map.set('submitted', true); + }); case SEARCH_FETCH_FAIL: return state.set('isLoading', false); case SEARCH_FETCH_SUCCESS: @@ -52,7 +55,6 @@ export default function search(state = initialState, action) { hashtags: fromJS(action.results.hashtags), })); - map.set('submitted', true); map.set('searchTerm', action.searchTerm); map.set('isLoading', false); });