|
|
|
@ -1,3 +1,4 @@ |
|
|
|
|
import { batch } from 'react-redux'; |
|
|
|
|
import { AnyAction } from 'redux'; |
|
|
|
|
|
|
|
|
|
import { IStore } from '../app/types'; |
|
|
|
@ -49,11 +50,14 @@ MiddlewareRegistry.register(({ dispatch, getState }: IStore) => (next: Function) |
|
|
|
|
const stats = filterBySearchCriteria(state, speakerStats); |
|
|
|
|
const pendingReorder = getPendingReorder(state); |
|
|
|
|
|
|
|
|
|
if (pendingReorder) { |
|
|
|
|
dispatch(updateSortedSpeakerStatsIds(getSortedSpeakerStatsIds(state, stats) ?? [])); |
|
|
|
|
} |
|
|
|
|
batch(() => { |
|
|
|
|
if (pendingReorder) { |
|
|
|
|
dispatch(updateSortedSpeakerStatsIds(getSortedSpeakerStatsIds(state, stats) ?? [])); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
dispatch(updateStats(stats)); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
dispatch(updateStats(stats)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|