Minor refactor + comment

This commit is contained in:
Neeraj Gupta 2023-08-02 16:41:05 +05:30
parent a8c2bc2d9a
commit 45e720917d
2 changed files with 1 additions and 1 deletions

View file

@ -154,7 +154,6 @@ class UserService {
setEmail(userDetails.email);
}
}
_logger.info("Successfully fetched user details");
return userDetails;
} catch(e) {
_logger.warning("Failed to fetch", e);

View file

@ -47,6 +47,7 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
Widget _getSectionOptions(BuildContext context) {
final bool? canDisableMFA = UserService.instance.canDisableEmailMFA();
if (canDisableMFA == null) {
// We don't know if the user can disable MFA yet, so we fetch the info
UserService.instance.getUserDetailsV2().then(
(value) => {
if (mounted) {setState(() {})}