diff --git a/lib/features/social/rider_profile_screen.dart b/lib/features/social/rider_profile_screen.dart index 8d4a757..72f85af 100644 --- a/lib/features/social/rider_profile_screen.dart +++ b/lib/features/social/rider_profile_screen.dart @@ -232,7 +232,7 @@ class _RiderProfileScreenState extends ConsumerState { } return SingleChildScrollView( - padding: const EdgeInsets.all(16.0), + padding: const EdgeInsets.fromLTRB(16.0, 16.0, 16.0, 100.0), child: Form( key: _formKey, child: Column( diff --git a/lib/services/social/rider_profile_service.dart b/lib/services/social/rider_profile_service.dart index f938939..39ba7f3 100644 --- a/lib/services/social/rider_profile_service.dart +++ b/lib/services/social/rider_profile_service.dart @@ -150,7 +150,7 @@ class RiderProfileService { final previousHandle = existingProfile?.handle; final isChangingHandle = - previousHandle != null && previousHandle != normalizedHandle; + previousHandle != null && previousHandle.isNotEmpty && previousHandle != normalizedHandle; final updatedProfile = RiderProfile( uid: uid, @@ -183,7 +183,7 @@ class RiderProfileService { }); // 3. Release previous handle if changed - if (isChangingHandle) { + if (isChangingHandle && previousHandle.isNotEmpty) { final oldHandleRef = firestore.collection('handles').doc(previousHandle); transaction.delete(oldHandleRef); }