This commit is contained in:
IndieKKY
2024-10-06 18:28:20 +08:00
parent 50e6579116
commit 9384c1419a
9 changed files with 111 additions and 61 deletions

View File

@@ -2,16 +2,16 @@ import {useAppDispatch, useAppSelector} from './redux'
import React, {useCallback} from 'react'
import {setNeedScroll, setReviewAction, setTempData} from '../redux/envReducer'
import {MESSAGE_TO_INJECT_MOVE} from '../consts/const'
import useMessage from '../messaging/layer2/useMessaging'
import useMessaging from '../messaging/layer2/useMessaging'
const useSubtitle = () => {
const dispatch = useAppDispatch()
const reviewed = useAppSelector(state => state.env.tempData.reviewed)
const reviewAction = useAppSelector(state => state.env.reviewAction)
const reviewActions = useAppSelector(state => state.env.tempData.reviewActions)
const {sendInject} = useMessage()
const {sendInject} = useMessaging()
const move = useCallback((time: number, togglePause: boolean) => {
sendInject(MESSAGE_TO_INJECT_MOVE, {time, togglePause})
sendInject('MOVE', {time, togglePause})
//review action
if (reviewed === undefined && !reviewAction) {