diff options
| author | Christian Cleberg <[email protected]> | 2026-07-16 00:54:59 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-07-16 00:54:59 -0500 |
| commit | d32ad837ac9eb153598c10c3cf47fbdb4e51e3ba (patch) | |
| tree | 4eac5967f649efac0df53c9e94d96274ead3cd2f /Hutch/Views/Repositories/RepositorySettingsViewModel.swift | |
| parent | 77cd5b5e56ec054b451a6165162fef655873a5d6 (diff) | |
| download | hutch-d32ad837ac9eb153598c10c3cf47fbdb4e51e3ba.tar.gz hutch-d32ad837ac9eb153598c10c3cf47fbdb4e51e3ba.tar.bz2 hutch-d32ad837ac9eb153598c10c3cf47fbdb4e51e3ba.zip | |
fix: make artifact upload actually fire, and show it when it fails
Picking a file did nothing. The fileImporter's isPresented binding was derived
from uploadTargetRef and nilled it on dismissal, but dismissal happens before
the completion runs — so the completion read nil and returned without
uploading. Presentation state and payload state cannot be the same state. A
plain isImporting bool drives presentation now; the tag survives in
uploadTargetRef until the completion consumes it.
The upload menu was also disabled when the repository has no tags, while the
explanation for that state lived inside the menu — unreachable exactly when it
applies, so the tap died with no reason given. sr.ht requires revspec to match a
tag, so having none is a real state worth explaining rather than hiding.
Failures were invisible too. uploadArtifact and deleteArtifact set error, but
the overlay only renders it when the list is empty, so a rejection on a
repository that already has artifacts — a duplicate filename is the likely one,
since sr.ht requires filenames to be unique per repository — set an error nobody
saw. The tab carries an error banner now.
Diffstat (limited to 'Hutch/Views/Repositories/RepositorySettingsViewModel.swift')
0 files changed, 0 insertions, 0 deletions
