🔫 Tweaking the trigger for download complete action
This commit is contained in:
@@ -18,7 +18,7 @@ import {
|
|||||||
LS_SINGLE_IMPORT,
|
LS_SINGLE_IMPORT,
|
||||||
IMS_COMIC_BOOK_DB_OBJECT_FETCHED,
|
IMS_COMIC_BOOK_DB_OBJECT_FETCHED,
|
||||||
} from "../constants/action-types";
|
} from "../constants/action-types";
|
||||||
import { isNil, isUndefined } from "lodash";
|
import { isNil } from "lodash";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
|
||||||
interface SearchData {
|
interface SearchData {
|
||||||
@@ -134,17 +134,20 @@ export const downloadAirDCPPItem =
|
|||||||
`search/${instanceId}/results/${resultId}/download`,
|
`search/${instanceId}/results/${resultId}/download`,
|
||||||
);
|
);
|
||||||
let downloadStatus = undefined;
|
let downloadStatus = undefined;
|
||||||
|
let count = 0;
|
||||||
// download status check
|
// download status check
|
||||||
await ADCPPSocket.addListener(`queue`, "queue_file_status", (status) => {
|
await ADCPPSocket.addListener(`queue`, "queue_file_status", (status) => {
|
||||||
if (status.status.completed) {
|
if (status.status.completed) {
|
||||||
downloadStatus = status;
|
downloadStatus = status;
|
||||||
|
if (count === 0) {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: LS_SINGLE_IMPORT,
|
type: LS_SINGLE_IMPORT,
|
||||||
meta: { remote: true },
|
meta: { remote: true },
|
||||||
data: { downloadStatus, comicObjectId },
|
data: { downloadStatus, comicObjectId },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
count += 1;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let bundleId;
|
let bundleId;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export const PullList = ({ issues }: PullListProps): ReactElement => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
dispatch(
|
dispatch(
|
||||||
getWeeklyPullList({
|
getWeeklyPullList({
|
||||||
startDate: "2022-5-1",
|
startDate: "2022-5-17",
|
||||||
pageSize: "15",
|
pageSize: "15",
|
||||||
currentPage: "1",
|
currentPage: "1",
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -81,7 +81,8 @@ export const RecentlyImported = ({
|
|||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{/* ComicInfo.xml presence */}
|
{/* ComicInfo.xml presence */}
|
||||||
{!isNil(sourcedMetadata.comicInfo) && (
|
{!isNil(sourcedMetadata.comicInfo) &&
|
||||||
|
!isEmpty(sourcedMetadata.comicInfo) && (
|
||||||
<span className="icon custom-icon is-small has-text-danger">
|
<span className="icon custom-icon is-small has-text-danger">
|
||||||
<img
|
<img
|
||||||
src="/img/comicinfoxml.svg"
|
src="/img/comicinfoxml.svg"
|
||||||
|
|||||||
Reference in New Issue
Block a user