Skip to content

Commit b6f12d3

Browse files
mohnjilesclaude
andcommitted
Surface "no download available" when downloadUris is empty
ExecuteDownloadAsync silently returned when the resolved URI list was empty (every mirror was gated/paid, or the file had no DownloadUrl on any source). The user saw the button briefly disable while the async method ran, then re-enable, with zero feedback — matching the report of "button went grey but nothing happened". Now shows a clear "No download available" notification explaining why nothing happened. Split out from the Model-is-null guard since that's not a user-facing condition. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1c3ecc7 commit b6f12d3

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

StabilityMatrix.Avalonia/ViewModels/CheckpointBrowser/CivArchiveDetailsPageViewModel.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,8 +663,17 @@ private async Task ExecuteDownloadAsync(
663663
string? sourceLabel
664664
)
665665
{
666-
if (downloadUris.Count == 0 || Model is null)
666+
if (Model is null)
667+
return;
668+
669+
if (downloadUris.Count == 0)
670+
{
671+
notificationService.Show(
672+
"No download available",
673+
"This file has no usable download URL — every mirror was either missing or gated/paid."
674+
);
667675
return;
676+
}
668677

669678
if (!settingsManager.IsLibraryDirSet)
670679
{

0 commit comments

Comments
 (0)