chore: hide download button in download dialogs if download is complete (#5157)
This commit is contained in:
parent
709126e563
commit
ab66ca35fe
2 changed files with 30 additions and 28 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue