Fix queuing downloads success toast
Always showed a success toast for 9999 chapters
Regression 3ae4d8d752
This commit is contained in:
@@ -306,6 +306,7 @@ export class Mangas {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
true,
|
true,
|
||||||
|
true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -323,6 +324,7 @@ export class Mangas {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
true,
|
true,
|
||||||
|
true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,6 +351,7 @@ export class Mangas {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
true,
|
true,
|
||||||
|
true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -366,6 +369,7 @@ export class Mangas {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
true,
|
true,
|
||||||
|
true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -424,6 +428,7 @@ export class Mangas {
|
|||||||
itemCount: number,
|
itemCount: number,
|
||||||
fnToExecute: () => Promise<unknown>,
|
fnToExecute: () => Promise<unknown>,
|
||||||
disableConfirmation?: boolean,
|
disableConfirmation?: boolean,
|
||||||
|
errorOnlyToast?: boolean,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const { always, bulkAction, bulkActionCountForce } = MANGA_ACTION_TO_CONFIRMATION_REQUIRED[action];
|
const { always, bulkAction, bulkActionCountForce } = MANGA_ACTION_TO_CONFIRMATION_REQUIRED[action];
|
||||||
const requiresConfirmation =
|
const requiresConfirmation =
|
||||||
@@ -452,6 +457,11 @@ export class Mangas {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await fnToExecute();
|
await fnToExecute();
|
||||||
|
|
||||||
|
if (errorOnlyToast) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
makeToast(
|
makeToast(
|
||||||
/* lingui-extract-ignore */
|
/* lingui-extract-ignore */
|
||||||
i18n.t({ ...MANGA_ACTION_TO_TRANSLATION[action].success, values: { count: itemCount } }),
|
i18n.t({ ...MANGA_ACTION_TO_TRANSLATION[action].success, values: { count: itemCount } }),
|
||||||
|
|||||||
Reference in New Issue
Block a user