refactor(frontend): normal skipToIssue logic
This commit is contained in:
parent
12b9365600
commit
eed52a47ed
3 changed files with 2 additions and 12 deletions
|
|
@ -26,8 +26,7 @@ let debounceTooltipChange = () => null;
|
|||
skipIntervals: state.skipIntervals,
|
||||
events: state.eventList,
|
||||
skip: state.skip,
|
||||
// not updating properly rn
|
||||
// skipToIssue: state.skipToIssue,
|
||||
skipToIssue: state.skipToIssue,
|
||||
disabled: state.cssLoading || state.messagesLoading || state.markedTargets,
|
||||
endTime: state.endTime,
|
||||
live: state.live,
|
||||
|
|
@ -85,8 +84,7 @@ export default class Timeline extends React.PureComponent {
|
|||
};
|
||||
|
||||
componentDidMount() {
|
||||
const { issues } = this.props;
|
||||
const skipToIssue = Controls.updateSkipToIssue();
|
||||
const { issues, skipToIssue } = this.props;
|
||||
const firstIssue = issues.get(0);
|
||||
deboucneJump = debounce(this.props.jump, 500);
|
||||
debounceTooltipChange = debounce(this.props.setTimelineHoverTime, 50);
|
||||
|
|
|
|||
|
|
@ -216,12 +216,6 @@ export default class Player extends MessageDistributor {
|
|||
update({ skipToIssue });
|
||||
}
|
||||
|
||||
updateSkipToIssue() {
|
||||
const skipToIssue = localStorage.getItem(SKIP_TO_ISSUE_STORAGE_KEY) === 'true';
|
||||
update({ skipToIssue });
|
||||
return skipToIssue;
|
||||
}
|
||||
|
||||
toggleAutoplay() {
|
||||
const autoplay = !getState().autoplay;
|
||||
localStorage.setItem(AUTOPLAY_STORAGE_KEY, `${autoplay}`);
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ export const togglePlay = initCheck((...args) => instance.togglePlay(...args));
|
|||
export const pause = initCheck((...args) => instance.pause(...args));
|
||||
export const toggleSkip = initCheck((...args) => instance.toggleSkip(...args));
|
||||
export const toggleSkipToIssue = initCheck((...args) => instance.toggleSkipToIssue(...args));
|
||||
export const updateSkipToIssue = initCheck((...args) => instance.updateSkipToIssue(...args));
|
||||
export const toggleAutoplay = initCheck((...args) => instance.toggleAutoplay(...args));
|
||||
export const toggleSpeed = initCheck((...args) => instance.toggleSpeed(...args));
|
||||
export const toggleEvents = initCheck((...args) => instance.toggleEvents(...args));
|
||||
|
|
@ -94,7 +93,6 @@ export const Controls = {
|
|||
pause,
|
||||
toggleSkip,
|
||||
toggleSkipToIssue,
|
||||
updateSkipToIssue,
|
||||
toggleAutoplay,
|
||||
toggleEvents,
|
||||
toggleSpeed,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue