Refresh library mangas after update
the gql updater subscription currently return stale data, thus, the mangas do net get updated in the cache
This commit is contained in:
@@ -45,7 +45,7 @@ const calcProgress = (status: UpdaterSubscription['updateStatusChanged'] | undef
|
||||
return Number.isNaN(progress) ? 0 : progress;
|
||||
};
|
||||
|
||||
function UpdateChecker() {
|
||||
function UpdateChecker({ handleFinishedUpdate }: { handleFinishedUpdate: () => void }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const { data: updaterData } = requestManager.useUpdaterSubscription();
|
||||
@@ -62,6 +62,11 @@ function UpdateChecker() {
|
||||
],
|
||||
);
|
||||
|
||||
const isUpdateFinished = progress === 100;
|
||||
if (isUpdateFinished) {
|
||||
handleFinishedUpdate();
|
||||
}
|
||||
|
||||
const onClick = async () => {
|
||||
try {
|
||||
await requestManager.startGlobalUpdate().response;
|
||||
|
||||
Reference in New Issue
Block a user