You've already forked bilibili-subtitle
跳转评论
This commit is contained in:
@@ -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(() => {
|
||||
|
Reference in New Issue
Block a user