From 77979e34b58b2cb0c4426d2cbc9601a4410dff88 Mon Sep 17 00:00:00 2001 From: Henrique Velloso Date: Fri, 20 Feb 2026 15:27:07 -0300 Subject: [PATCH] hotfix(trust-dialog): show "Always trust" only when trust can be persisted The "Always trust" switch was shown using profile availability, which can be null even when the user is signed in, and could also appear when trust could not be saved. Use signer readiness (`activePubkey` + `activeSigner`) as the visibility condition. This makes the dialog behavior consistent with real trust persistence capability. --- lib/widgets/install_alert_dialog.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/widgets/install_alert_dialog.dart b/lib/widgets/install_alert_dialog.dart index 57d8047..e1d03ab 100644 --- a/lib/widgets/install_alert_dialog.dart +++ b/lib/widgets/install_alert_dialog.dart @@ -36,6 +36,8 @@ class InstallAlertDialog extends HookConsumerWidget { } final trustedSignerNotifier = useState(false); final signedInPubkey = ref.watch(Signer.activePubkeyProvider); + final activeSigner = ref.watch(Signer.activeSignerProvider); + final canPersistTrust = signedInPubkey != null && activeSigner != null; final theme = Theme.of(context); final baseTextSize = theme.textTheme.bodyMedium?.fontSize ?? 14.0; @@ -62,7 +64,7 @@ class InstallAlertDialog extends HookConsumerWidget { size: baseTextSize, ), ] else ...[ - signedInPubkey != null + canPersistTrust ? RelevantWhoFollowContainer(app: app, size: baseTextSize) : Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -85,7 +87,7 @@ class InstallAlertDialog extends HookConsumerWidget { ], ), // Only show "Always trust" when signed in (requires signer to persist) - if (signedInPubkey != null) ...[ + if (canPersistTrust) ...[ const Gap(14), Row( crossAxisAlignment: CrossAxisAlignment.center,