mirror of
https://github.com/zapstore/zapstore.git
synced 2026-10-05 12:38:24 +00:00
fix: opdate InstallAlertDialog to conditionally display "Always trust" switch based on user sign-in status
This commit is contained in:
@@ -84,37 +84,40 @@ class InstallAlertDialog extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const Gap(14),
|
// Only show "Always trust" when signed in (requires signer to persist)
|
||||||
Row(
|
if (profile != null) ...[
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
const Gap(14),
|
||||||
children: [
|
Row(
|
||||||
Switch(
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
value: trustedSignerNotifier.value,
|
children: [
|
||||||
onChanged: (value) {
|
Switch(
|
||||||
trustedSignerNotifier.value = value;
|
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,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
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,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user