You've already forked bilibili-subtitle
fix
This commit is contained in:
@@ -8,15 +8,17 @@ const useMessagingService = () => {
|
||||
const dispatch = useAppDispatch()
|
||||
|
||||
//methods
|
||||
const methods = useMemo(() => ({
|
||||
[MESSAGE_TO_APP_SET_INFOS]: (params: any, from: string, context: MethodContext) => {
|
||||
const methods: {
|
||||
[key: string]: (params: any, context: MethodContext) => boolean
|
||||
} = useMemo(() => ({
|
||||
[MESSAGE_TO_APP_SET_INFOS]: (params: any, context: MethodContext) => {
|
||||
dispatch(setInfos(params.infos))
|
||||
dispatch(setCurInfo(undefined))
|
||||
dispatch(setCurFetched(false))
|
||||
dispatch(setData(undefined))
|
||||
return true
|
||||
},
|
||||
[MESSAGE_TO_APP_SET_VIDEO_INFO]: (params: any, from: string, context: MethodContext) => {
|
||||
[MESSAGE_TO_APP_SET_VIDEO_INFO]: (params: any, context: MethodContext) => {
|
||||
dispatch(setInfos(params.infos))
|
||||
dispatch(setUrl(params.url))
|
||||
dispatch(setTitle(params.title))
|
||||
|
Reference in New Issue
Block a user