Преглед на файлове

Minor refactor + comment

Neeraj Gupta преди 1 година
родител
ревизия
45e720917d
променени са 2 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 0 1
      lib/services/user_service.dart
  2. 1 0
      lib/ui/settings/security_section_widget.dart

+ 0 - 1
lib/services/user_service.dart

@@ -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);

+ 1 - 0
lib/ui/settings/security_section_widget.dart

@@ -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(() {})}