Refresh track records only for logged-in trackers

Otherwise, the request will just result in an error
This commit is contained in:
schroda
2025-06-26 00:57:56 +02:00
parent 6bc21c5972
commit d095a3c794

View File

@@ -78,7 +78,9 @@ export const TrackManga = ({ manga }: { manga: MangaIdInfo & Pick<MangaType, 'ti
fetchedLatestTrackDataRef.current = true; fetchedLatestTrackDataRef.current = true;
Promise.all( Promise.all(
mangaTrackRecords.map((trackRecord) => requestManager.fetchTrackBind(trackRecord.id).response), mangaTrackRecords
.filter((trackRecord) => trackersInUseIds.includes(trackRecord.trackerId))
.map((trackRecord) => requestManager.fetchTrackBind(trackRecord.id).response),
).catch((e) => makeToast(t('tracking.error.label.could_not_fetch_track_info'), 'error', getErrorMessage(e))); ).catch((e) => makeToast(t('tracking.error.label.could_not_fetch_track_info'), 'error', getErrorMessage(e)));
}, [mangaTrackRecords]); }, [mangaTrackRecords]);