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.
This commit is contained in:
Henrique Velloso
2026-02-20 15:27:07 -03:00
parent 7b1f2a3ef7
commit 77979e34b5
+4 -2
View File
@@ -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,