diff --git a/b0esche_cloud/lib/widgets/account_settings_dialog.dart b/b0esche_cloud/lib/widgets/account_settings_dialog.dart index 63b9d51..68cae38 100644 --- a/b0esche_cloud/lib/widgets/account_settings_dialog.dart +++ b/b0esche_cloud/lib/widgets/account_settings_dialog.dart @@ -59,7 +59,8 @@ class _AccountSettingsDialogState extends State { // Listen for changes in display name _displayNameController.addListener(() { - final newHasChanges = _displayNameController.text != (_currentUser?.displayName ?? ''); + final newHasChanges = + _displayNameController.text != (_currentUser?.displayName ?? ''); if (_hasChanges != newHasChanges) { setState(() => _hasChanges = newHasChanges); } @@ -148,9 +149,6 @@ class _AccountSettingsDialogState extends State { } Future _updateProfile() async { - print( - 'DEBUG: _updateProfile called with displayName: ${_displayNameController.text}', - ); if (_currentUser == null) { return; } @@ -183,7 +181,6 @@ class _AccountSettingsDialogState extends State { Navigator.of(context).pop(); } } catch (e) { - print('DEBUG: _updateProfile error: $e'); if (mounted) { // Show error message ScaffoldMessenger.of( @@ -651,7 +648,9 @@ class _AccountSettingsDialogState extends State { child: SizedBox( width: 144, child: ModernGlassButton( - onPressed: _isLoading || !_hasChanges ? null : () => _updateProfile(), + onPressed: () { + if (!_isLoading && _hasChanges) _updateProfile(); + }, isLoading: _isLoading, child: _isLoading ? const SizedBox(