Skip to content

Commit c368230

Browse files
committed
Merge branch 'develop'
2 parents 311e062 + d7f5998 commit c368230

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

wayat/backend/app/business/wayat_management/controllers/user.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ async def update_preferences(request: UpdatePreferencesRequest,
8888
user: FirebaseAuthenticatedUser = Depends(get_user())):
8989
logger.info(f"Updating preferences for user {user.uid} with values {request.dict(exclude_unset=True)}")
9090
await user_service.update_user(user.uid, **request.dict(exclude_unset=True))
91-
if request.share_location is False:
92-
# share_location was set to false in this request, so we must delete the user
93-
# from all the maps in which he's present
91+
if request.share_location is not None:
92+
# share_location was changed in this request, so we must refresh the user status
93+
# on all the maps in which he's present
9494
await map_service.regenerate_maps_containing_user(user.uid)

wayat/frontend/lib/features/contact_profile/page/contact_profile_page.dart

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,22 @@ class ContactProfilePage extends StatelessWidget {
4242
contact = contactLocated;
4343
}
4444

45-
return Scaffold(
46-
appBar: PreferredSize(
47-
preferredSize: const Size.fromHeight(40), child: CustomAppBar()),
48-
body: Column(
49-
mainAxisSize: MainAxisSize.min,
50-
children: [
51-
appBar(),
52-
mapSection(context, canBeLocated),
53-
dataSection(context, canBeLocated)
54-
],
45+
return WillPopScope(
46+
onWillPop: () async {
47+
GetIt.I.get<HomeState>().setSelectedContact(null, "");
48+
return true;
49+
},
50+
child: Scaffold(
51+
appBar: PreferredSize(
52+
preferredSize: const Size.fromHeight(40), child: CustomAppBar()),
53+
body: Column(
54+
mainAxisSize: MainAxisSize.min,
55+
children: [
56+
appBar(),
57+
mapSection(context, canBeLocated),
58+
dataSection(context, canBeLocated)
59+
],
60+
),
5561
),
5662
);
5763
}

0 commit comments

Comments
 (0)