mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-22 01:26:48 +03:00
Fix action missing bug when playback speed is set to live
This commit is contained in:
parent
61c09e1cc3
commit
4a739356b1
|
@ -198,12 +198,6 @@ class SliderMonitor<S, A extends Action<string>> extends (PureComponent ||
|
||||||
const aLoop = () => {
|
const aLoop = () => {
|
||||||
const replayDiff = Date.now() - currentTimestamp;
|
const replayDiff = Date.now() - currentTimestamp;
|
||||||
if (replayDiff >= timestampDiff) {
|
if (replayDiff >= timestampDiff) {
|
||||||
this.props.dispatch(
|
|
||||||
jumpToAction(
|
|
||||||
this.props.stagedActionIds[this.props.currentStateIndex + 1],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
this.props.currentStateIndex >=
|
this.props.currentStateIndex >=
|
||||||
this.props.computedStates.length - 1
|
this.props.computedStates.length - 1
|
||||||
|
@ -212,14 +206,23 @@ class SliderMonitor<S, A extends Action<string>> extends (PureComponent ||
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
timestampDiff = this.getLatestTimestampDiff(
|
// Update to check for nextActionId and dispatch it
|
||||||
this.props.currentStateIndex,
|
const nextActionId =
|
||||||
);
|
this.props.stagedActionIds[this.props.currentStateIndex + 1];
|
||||||
currentTimestamp = Date.now();
|
if (nextActionId !== undefined) {
|
||||||
|
this.props.dispatch(jumpToAction(nextActionId));
|
||||||
|
|
||||||
this.setState({
|
timestampDiff = this.getLatestTimestampDiff(
|
||||||
timer: requestAnimationFrame(aLoop),
|
this.props.currentStateIndex,
|
||||||
});
|
);
|
||||||
|
currentTimestamp = Date.now();
|
||||||
|
|
||||||
|
this.setState({
|
||||||
|
timer: requestAnimationFrame(aLoop),
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.pauseReplay();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
timer: requestAnimationFrame(aLoop),
|
timer: requestAnimationFrame(aLoop),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user