Function
reorderEvents
(
state,
action: PayloadAction<{ fromIndex: number; toIndex: number }>,
)
Source from the content-addressed store, hash-verified
| 398 | } |
| 399 | }, |
| 400 | reorderEvents( |
| 401 | state, |
| 402 | action: PayloadAction<{ fromIndex: number; toIndex: number }>, |
| 403 | ) { |
| 404 | state.dirty = true; |
| 405 | const { fromIndex, toIndex } = action.payload; |
| 406 | const [movedEvent] = state.series.splice(fromIndex, 1); |
| 407 | if (movedEvent) { |
| 408 | state.series.splice(toIndex, 0, movedEvent); |
| 409 | } |
| 410 | }, |
| 411 | changeVisibleSeries( |
| 412 | state, |
| 413 | action: PayloadAction<string[] | undefined>, |
Tested by
no test coverage detected