mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-21 18:13:55 +00:00
refactor: streamline downloader logic in DownloadSettingsModal
This commit is contained in:
@@ -99,10 +99,9 @@ export function DownloadSettingsModal({
|
|||||||
|
|
||||||
for (const uri of repack.uris) {
|
for (const uri of repack.uris) {
|
||||||
const uriDownloaders = getDownloadersForUri(uri);
|
const uriDownloaders = getDownloadersForUri(uri);
|
||||||
if (uriDownloaders.length > 0) {
|
const isAvailable = !unavailableUrisSet.has(uri);
|
||||||
const downloader = uriDownloaders[0];
|
|
||||||
const isAvailable = !unavailableUrisSet.has(uri);
|
|
||||||
|
|
||||||
|
for (const downloader of uriDownloaders) {
|
||||||
const existing = downloaderMap.get(downloader);
|
const existing = downloaderMap.get(downloader);
|
||||||
if (existing) {
|
if (existing) {
|
||||||
existing.hasAvailable = existing.hasAvailable || isAvailable;
|
existing.hasAvailable = existing.hasAvailable || isAvailable;
|
||||||
|
|||||||
Reference in New Issue
Block a user