Skip to content

Commit

Permalink
Make ZHTLC activation banner less scary
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlVS committed Oct 11, 2023
1 parent 81ebdd3 commit 7f193e7
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,11 @@ class _ZCoinStatusWidgetState extends State<ZCoinStatusWidget> {
if (isActivationInProgress) {
final progressState = state as ZCoinActivationInProgess;
return ListTile(
onTap: () => _showInProgressDialog(context),
title: Text(localisations.activating(protocolTag)),
dense: true,
onTap: () => _showInProgressDialog(context),
subtitle: Text(localisations.doNotCloseTheAppTapForMoreInfo),
leading: Icon(
Icons.warning,
color: Colors.red,
),
leading: Icon(Icons.hourglass_full_rounded),
tileColor: Theme.of(context).primaryColor,
trailing: SizedBox(
child: RotatingCircularProgressIndicator(
Expand Down Expand Up @@ -119,7 +117,14 @@ class _ZCoinStatusWidgetState extends State<ZCoinStatusWidget> {
}

static void listener(BuildContext context, ZCoinActivationState state) {
final scaffold = ScaffoldMessenger.maybeOf(context);
ScaffoldMessengerState scaffold;

try {
ScaffoldMessenger.maybeOf(context);
} catch (e) {
return;
}

if (scaffold == null) return;

final localisations = AppLocalizations.of(context);
Expand Down

0 comments on commit 7f193e7

Please sign in to comment.