fixed guardian login edge cases and misleading placeholders on failed loads
This commit is contained in:
@@ -141,6 +141,10 @@ Future<void> _maybePrompt(
|
||||
if (prompt.spentOnDisplay) {
|
||||
prompt.markShown(settings.val(write: true).notificationSettings);
|
||||
}
|
||||
// The OS prompt (and its "declined" follow-up) outlive this dialog, so
|
||||
// hold on to them: releasing the guard at the dialog's close would let a
|
||||
// second occasion stack another dialog over the pending OS prompt.
|
||||
Future<void>? permissionRequest;
|
||||
await showDialog<void>(
|
||||
context: context,
|
||||
builder: ConfirmDialog(
|
||||
@@ -150,9 +154,10 @@ Future<void> _maybePrompt(
|
||||
confirmButton: 'Weiter',
|
||||
cancelButton: null,
|
||||
onConfirm: () =>
|
||||
unawaited(_requestPermission(context, settings, prompt)),
|
||||
permissionRequest = _requestPermission(context, settings, prompt),
|
||||
).build,
|
||||
);
|
||||
await permissionRequest;
|
||||
} finally {
|
||||
_promptInFlight = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user