Skip to content

Commit 7cdcad5

Browse files
committed
removed old reverse and fast forward code
1 parent 5ea7847 commit 7cdcad5

File tree

3 files changed

+0
-158
lines changed

3 files changed

+0
-158
lines changed

src/app/__tests__/ErrorMsg.test.tsx

Lines changed: 0 additions & 80 deletions
This file was deleted.

src/app/__tests__/Loader.test.tsx

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/app/slices/mainSlice.ts

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -282,59 +282,6 @@ export const mainSlice = createSlice({
282282
tabs[currentTab].intervalId = action.payload;
283283
},
284284

285-
moveForward: (state, action) => {
286-
const { port, tabs, currentTab } = state;
287-
const { hierarchy, snapshots, sliderIndex, intervalId } = tabs[currentTab] || {};
288-
289-
if (sliderIndex < snapshots.length - 1) {
290-
const newIndex = sliderIndex + 1;
291-
// eslint-disable-next-line max-len
292-
// finds the name by the newIndex parsing through the hierarchy to send to background.js the current name in the jump action
293-
const nameFromIndex = findName(newIndex, hierarchy);
294-
295-
port.postMessage({
296-
action: 'jumpToSnap',
297-
payload: snapshots[newIndex],
298-
index: newIndex,
299-
name: nameFromIndex,
300-
tabId: currentTab,
301-
});
302-
303-
tabs[currentTab].sliderIndex = newIndex;
304-
305-
// message is coming from the user
306-
if (!action.payload) {
307-
clearInterval(intervalId);
308-
tabs[currentTab].playing = false;
309-
}
310-
}
311-
},
312-
313-
moveBackward: (state, action) => {
314-
const { port, tabs, currentTab } = state;
315-
const { hierarchy, snapshots, sliderIndex, intervalId } = tabs[currentTab] || {};
316-
317-
if (sliderIndex > 0) {
318-
const newIndex = sliderIndex - 1;
319-
// eslint-disable-next-line max-len
320-
// finds the name by the newIndex parsing through the hierarchy to send to background.js the current name in the jump action
321-
const nameFromIndex = findName(newIndex, hierarchy);
322-
323-
port.postMessage({
324-
action: 'jumpToSnap',
325-
payload: snapshots[newIndex],
326-
index: newIndex,
327-
name: nameFromIndex,
328-
tabId: currentTab,
329-
newProp: 'newPropFromReducer',
330-
});
331-
clearInterval(intervalId);
332-
333-
tabs[currentTab].sliderIndex = newIndex;
334-
tabs[currentTab].playing = false;
335-
}
336-
},
337-
338285
resetSlider: (state) => {
339286
const { port, tabs, currentTab } = state;
340287
const { snapshots, sliderIndex } = tabs[currentTab] || {};
@@ -494,8 +441,6 @@ export const {
494441
launchContentScript,
495442
playForward,
496443
startPlaying,
497-
moveForward,
498-
moveBackward,
499444
resetSlider,
500445
toggleMode,
501446
importSnapshots,

0 commit comments

Comments
 (0)