chore: hide download button in download dialogs if download is complete (#5157)

This commit is contained in:
ggurdin 2026-01-09 11:25:52 -05:00 committed by GitHub
parent 709126e563
commit ab66ca35fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 30 additions and 28 deletions

View file

@ -439,19 +439,20 @@ class AnalyticsDownloadDialogState extends State<AnalyticsDownloadDialog> {
],
),
),
Padding(
padding: const EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
child: OutlinedButton(
onPressed: _downloading ? null : _downloadAnalytics,
child: _downloading
? const SizedBox(
height: 10,
width: 100,
child: LinearProgressIndicator(),
)
: Text(L10n.of(context).download),
if (!_downloaded)
Padding(
padding: const EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
child: OutlinedButton(
onPressed: _downloading ? null : _downloadAnalytics,
child: _downloading
? const SizedBox(
height: 10,
width: 100,
child: LinearProgressIndicator(),
)
: Text(L10n.of(context).download),
),
),
),
AnimatedSize(
duration: FluffyThemes.animationDuration,
child: _statusText != null

View file

@ -378,23 +378,24 @@ class DownloadAnalyticsDialogState extends State<DownloadAnalyticsDialog> {
),
),
),
Padding(
padding: const EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
child: OutlinedButton(
onPressed: _loading || !_initialized ? null : _runDownload,
child: _initialized && !_loading
? Text(
_loading
? L10n.of(context).downloading
: L10n.of(context).download,
)
: const SizedBox(
height: 10,
width: 100,
child: LinearProgressIndicator(),
),
if (!_downloaded)
Padding(
padding: const EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
child: OutlinedButton(
onPressed: _loading || !_initialized ? null : _runDownload,
child: _initialized && !_loading
? Text(
_loading
? L10n.of(context).downloading
: L10n.of(context).download,
)
: const SizedBox(
height: 10,
width: 100,
child: LinearProgressIndicator(),
),
),
),
),
AnimatedSize(
duration: FluffyThemes.animationDuration,
child: _statusText != null