🐛 fixed : 跳过异常新闻和选中新闻一致时直接关闭
This commit is contained in:
parent
0bf20343d0
commit
45b0912d48
@ -31,9 +31,13 @@ export default function ButtonPush2Video(props: PushVideoProps) {
|
|||||||
const {t} = useTranslation()
|
const {t} = useTranslation()
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
const handlePush = (action: ProcessResult) => {
|
const handlePush = (action: ProcessResult) => {
|
||||||
setLoading(true)
|
|
||||||
const skip = action === ProcessResult.Skip && state.errorIds.length > 0
|
const skip = action === ProcessResult.Skip && state.errorIds.length > 0
|
||||||
const ids = !skip ? props.ids : props.ids.filter(id => !state.errorIds.includes(id));
|
const ids = !skip ? props.ids : props.ids.filter(id => !state.errorIds.includes(id));
|
||||||
|
if(skip && (state.errorIds.length == props.ids.length || ids.length == 0)){
|
||||||
|
setState({modalVisible: false})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setLoading(true)
|
||||||
push2video(ids).then(() => {
|
push2video(ids).then(() => {
|
||||||
setState({modalVisible: false})
|
setState({modalVisible: false})
|
||||||
if (skip) {
|
if (skip) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user