Merge pull request #321 from zapstore/fix/hide-always-trust-when-signed-out

Hide "Always trust" toggle when user is not signed in
This commit is contained in:
franzap
2026-02-17 20:26:07 +00:00
committed by GitHub
+33 -30
View File
@@ -84,37 +84,40 @@ class InstallAlertDialog extends HookConsumerWidget {
),
],
),
const Gap(14),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Switch(
value: trustedSignerNotifier.value,
onChanged: (value) {
trustedSignerNotifier.value = value;
},
),
Gap(4),
Expanded(
child: Row(
children: [
Text(
'Always trust',
style: theme.textTheme.bodyMedium?.copyWith(
color: theme.colorScheme.onSurface,
),
),
Gap(4),
AuthorContainer(
beforeText: '',
profile: publisher,
size: baseTextSize,
),
],
// Only show "Always trust" when signed in (requires signer to persist)
if (profile != null) ...[
const Gap(14),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Switch(
value: trustedSignerNotifier.value,
onChanged: (value) {
trustedSignerNotifier.value = value;
},
),
),
],
),
Gap(4),
Expanded(
child: Row(
children: [
Text(
'Always trust',
style: theme.textTheme.bodyMedium?.copyWith(
color: theme.colorScheme.onSurface,
),
),
Gap(4),
AuthorContainer(
beforeText: '',
profile: publisher,
size: baseTextSize,
),
],
),
),
],
),
],
],
],
),