Minor refactor + comment
This commit is contained in:
parent
a8c2bc2d9a
commit
45e720917d
2 changed files with 1 additions and 1 deletions
|
@ -154,7 +154,6 @@ class UserService {
|
||||||
setEmail(userDetails.email);
|
setEmail(userDetails.email);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_logger.info("Successfully fetched user details");
|
|
||||||
return userDetails;
|
return userDetails;
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
_logger.warning("Failed to fetch", e);
|
_logger.warning("Failed to fetch", e);
|
||||||
|
|
|
@ -47,6 +47,7 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
|
||||||
Widget _getSectionOptions(BuildContext context) {
|
Widget _getSectionOptions(BuildContext context) {
|
||||||
final bool? canDisableMFA = UserService.instance.canDisableEmailMFA();
|
final bool? canDisableMFA = UserService.instance.canDisableEmailMFA();
|
||||||
if (canDisableMFA == null) {
|
if (canDisableMFA == null) {
|
||||||
|
// We don't know if the user can disable MFA yet, so we fetch the info
|
||||||
UserService.instance.getUserDetailsV2().then(
|
UserService.instance.getUserDetailsV2().then(
|
||||||
(value) => {
|
(value) => {
|
||||||
if (mounted) {setState(() {})}
|
if (mounted) {setState(() {})}
|
||||||
|
|
Loading…
Add table
Reference in a new issue