You've already forked bilibili-subtitle
消息通信优化
This commit is contained in:
@@ -19,8 +19,8 @@ import {EventBusContext} from '../Router'
|
||||
import {EVENT_EXPAND, GEMINI_TOKENS, TOTAL_HEIGHT_MAX, TOTAL_HEIGHT_MIN, WORDS_MIN, WORDS_RATE, MESSAGE_TO_INJECT_GET_VIDEO_STATUS, MESSAGE_TO_INJECT_GET_VIDEO_ELEMENT_INFO, MESSAGE_TO_INJECT_REFRESH_VIDEO_INFO, MESSAGE_TO_INJECT_HIDE_TRANS, MESSAGE_TO_INJECT_UPDATETRANSRESULT} from '../const'
|
||||
import {useInterval} from 'ahooks'
|
||||
import {getModelMaxTokens, getWholeText} from '../util/biz_util'
|
||||
import {sendInject} from '../util/biz_util'
|
||||
import {MESSAGE_TO_INJECT_GET_SUBTITLE} from '../const'
|
||||
import useMessage from '../messaging/useMessage'
|
||||
|
||||
/**
|
||||
* Service是单例,类似后端的服务概念
|
||||
@@ -44,6 +44,7 @@ const useSubtitleService = () => {
|
||||
const autoTranslate = useAppSelector(state => state.env.autoTranslate)
|
||||
const reviewed = useAppSelector(state => state.env.tempData.reviewed)
|
||||
const reviewActions = useAppSelector(state => state.env.tempData.reviewActions)
|
||||
const {sendInject} = useMessage()
|
||||
|
||||
//如果reviewActions达到15次,则设置reviewed为false
|
||||
useEffect(() => {
|
||||
|
Reference in New Issue
Block a user