@@ -282,59 +282,6 @@ export const mainSlice = createSlice({
282
282
tabs [ currentTab ] . intervalId = action . payload ;
283
283
} ,
284
284
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
-
338
285
resetSlider : ( state ) => {
339
286
const { port, tabs, currentTab } = state ;
340
287
const { snapshots, sliderIndex } = tabs [ currentTab ] || { } ;
@@ -494,8 +441,6 @@ export const {
494
441
launchContentScript,
495
442
playForward,
496
443
startPlaying,
497
- moveForward,
498
- moveBackward,
499
444
resetSlider,
500
445
toggleMode,
501
446
importSnapshots,
0 commit comments