Fix: Empty main location bug (partially addressed in commit a2a7ae5fc6
)
parent
780d3cbbc2
commit
63bedb0280
|
@ -201,9 +201,8 @@ class _UserDataPageState extends State<UserDataPage> {
|
|||
}
|
||||
|
||||
// Save locations
|
||||
if (_mainLocation != _mainLocationFromDb) {
|
||||
if (_mainLocation == null || _mainLocation != _mainLocationFromDb) {
|
||||
if (_mainLocation != null) {
|
||||
// Update existing user document with new locations
|
||||
await locationsRef
|
||||
.doc(Constants.dbDocMainLocation)
|
||||
.set(_mainLocation!.toMap());
|
||||
|
@ -212,7 +211,6 @@ class _UserDataPageState extends State<UserDataPage> {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (_secondaryLocation != _secondaryLocationFromDb) {
|
||||
if (_secondaryLocation != null) {
|
||||
await locationsRef
|
||||
|
|
Loading…
Reference in New Issue