mirror of
https://github.com/zapstore/zapstore.git
synced 2026-10-05 20:48:24 +00:00
hotfix(trust-dialog): show "Always trust" based on signed-in state
Use `Signer.activePubkeyProvider` to determine if user is signed in, instead of `activeProfileProvider(LocalSource())`. The profile can be null while user is already authenticated, which was hiding the "Always trust" switch incorrectly. This keeps the switch visible for signed-in users and hidden for signed-out users, matching the actual trust persistence capability.
This commit is contained in:
@@ -35,7 +35,7 @@ class InstallAlertDialog extends HookConsumerWidget {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
final trustedSignerNotifier = useState(false);
|
||||
final profile = ref.watch(Signer.activeProfileProvider(LocalSource()));
|
||||
final signedInPubkey = ref.watch(Signer.activePubkeyProvider);
|
||||
final theme = Theme.of(context);
|
||||
final baseTextSize = theme.textTheme.bodyMedium?.fontSize ?? 14.0;
|
||||
|
||||
@@ -62,7 +62,7 @@ class InstallAlertDialog extends HookConsumerWidget {
|
||||
size: baseTextSize,
|
||||
),
|
||||
] else ...[
|
||||
profile != null
|
||||
signedInPubkey != null
|
||||
? RelevantWhoFollowContainer(app: app, size: baseTextSize)
|
||||
: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -85,7 +85,7 @@ class InstallAlertDialog extends HookConsumerWidget {
|
||||
],
|
||||
),
|
||||
// Only show "Always trust" when signed in (requires signer to persist)
|
||||
if (profile != null) ...[
|
||||
if (signedInPubkey != null) ...[
|
||||
const Gap(14),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
|
||||
Reference in New Issue
Block a user