跳转评论

This commit is contained in:
IndieKKY
2024-09-19 15:08:15 +08:00
parent 1f1d48b56a
commit be6b94164d
16 changed files with 3174 additions and 2329 deletions

View File

@@ -13,6 +13,7 @@ import {
setTitle,
setTotalHeight,
setUrl,
setTempData,
} from '../redux/envReducer'
import {EventBusContext} from '../Router'
import {EVENT_EXPAND, GEMINI_TOKENS, TOTAL_HEIGHT_MAX, TOTAL_HEIGHT_MIN, WORDS_MIN, WORDS_RATE} from '../const'
@@ -39,6 +40,17 @@ const useSubtitleService = () => {
const transResults = useAppSelector(state => state.env.transResults)
const hideOnDisableAutoTranslate = useAppSelector(state => state.env.envData.hideOnDisableAutoTranslate)
const autoTranslate = useAppSelector(state => state.env.autoTranslate)
const reviewed = useAppSelector(state => state.env.tempData.reviewed)
const reviewActions = useAppSelector(state => state.env.tempData.reviewActions)
//如果reviewActions达到15次则设置reviewed为false
useEffect(() => {
if (reviewed === undefined && reviewActions && reviewActions >= 3) {
dispatch(setTempData({
reviewed: false
}))
}
}, [reviewActions, dispatch, reviewed])
// 监听消息
useEffect(() => {