fix: request focus after authentication success
This commit is contained in:
@@ -150,6 +150,7 @@ class DeleteAccountPage extends StatelessWidget {
|
||||
);
|
||||
|
||||
if (hasAuthenticated) {
|
||||
FocusScope.of(context).requestFocus();
|
||||
final choice = await showChoiceDialogOld(
|
||||
context,
|
||||
l10n.confirmAccountDeleteTitle,
|
||||
|
||||
@@ -89,6 +89,7 @@ class _VerifyRecoveryPageState extends State<VerifyRecoveryPage> {
|
||||
"Please authenticate to view your recovery key",
|
||||
);
|
||||
if (hasAuthenticated) {
|
||||
FocusScope.of(context).requestFocus();
|
||||
String recoveryKey;
|
||||
try {
|
||||
recoveryKey =
|
||||
|
||||
@@ -377,6 +377,7 @@ class _CodeWidgetState extends State<CodeWidget> {
|
||||
if (!isAuthSuccessful) {
|
||||
return;
|
||||
}
|
||||
FocusScope.of(context).requestFocus();
|
||||
final Code? code = await Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (BuildContext context) {
|
||||
@@ -395,6 +396,7 @@ class _CodeWidgetState extends State<CodeWidget> {
|
||||
if (!isAuthSuccessful) {
|
||||
return;
|
||||
}
|
||||
FocusScope.of(context).requestFocus();
|
||||
// ignore: unused_local_variable
|
||||
final Code? code = await Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
@@ -414,6 +416,7 @@ class _CodeWidgetState extends State<CodeWidget> {
|
||||
if (!isAuthSuccessful) {
|
||||
return;
|
||||
}
|
||||
FocusScope.of(context).requestFocus();
|
||||
final l10n = context.l10n;
|
||||
await showChoiceActionSheet(
|
||||
context,
|
||||
|
||||
@@ -44,6 +44,7 @@ class AccountSectionWidget extends StatelessWidget {
|
||||
l10n.authToChangeYourEmail,
|
||||
);
|
||||
if (hasAuthenticated) {
|
||||
FocusScope.of(context).requestFocus();
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
|
||||
@@ -133,6 +133,7 @@ Future<void> _exportCodes(BuildContext context, String fileContent) async {
|
||||
if (!hasAuthenticated) {
|
||||
return;
|
||||
}
|
||||
FocusScope.of(context).requestFocus();
|
||||
Future.delayed(
|
||||
const Duration(milliseconds: 1200),
|
||||
() async => await shareDialog(
|
||||
|
||||
@@ -78,6 +78,7 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
|
||||
l10n.authToViewYourRecoveryKey,
|
||||
);
|
||||
if (hasAuthenticated) {
|
||||
FocusScope.of(context).requestFocus();
|
||||
String recoveryKey;
|
||||
try {
|
||||
recoveryKey =
|
||||
@@ -113,6 +114,7 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
|
||||
final isEmailMFAEnabled =
|
||||
UserService.instance.hasEmailMFAEnabled();
|
||||
if (hasAuthenticated) {
|
||||
FocusScope.of(context).requestFocus();
|
||||
await updateEmailMFA(!isEmailMFAEnabled);
|
||||
if (mounted) {
|
||||
setState(() {});
|
||||
@@ -136,6 +138,7 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
|
||||
context.l10n.authToViewYourActiveSessions,
|
||||
);
|
||||
if (hasAuthenticated) {
|
||||
FocusScope.of(context).requestFocus();
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (BuildContext context) {
|
||||
@@ -166,6 +169,7 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
|
||||
context.l10n.lockScreenEnablePreSteps,
|
||||
);
|
||||
if (hasAuthenticated) {
|
||||
FocusScope.of(context).requestFocus();
|
||||
setState(() {});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -119,6 +119,7 @@ class SettingsPage extends StatelessWidget {
|
||||
return;
|
||||
}
|
||||
}
|
||||
FocusScope.of(context).requestFocus();
|
||||
await routeToPage(
|
||||
context,
|
||||
const OnboardingPage(),
|
||||
|
||||
Reference in New Issue
Block a user