Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class GeoWidgetLauncherFragment : Fragment(), OnSyncListener {

AppTheme {
Scaffold(
drawerGesturesEnabled = scaffoldState.drawerState.isOpen,
drawerGesturesEnabled = true,
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drawerGesturesEnabled is now always true, which means the drawer can be opened via edge-swipe even if this fragment is ever launched with toolBarHomeNavigation = NAVIGATE_BACK (this argument exists in the nav graph and is passed into GeoWidgetLauncherScreen). Consider gating drawer gestures on the toolBarHomeNavigation value (while still allowing swipe-to-close when the drawer is open) so the drawer can’t be opened on back-only screens.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qiarie Please follow up on this. The menu action can either be used for back navigation or launching the side navigation. With this change can you test when the toolbar action is used for back navigation like in the projects using the geowidget module. We should not allow opening of the drawer via the gesture if the action for the toolbar is for navigating back to the previous screen.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ellykits I have a commit ready that will handle that. I am waiting for credentials for an app with maps to fully test.

scaffoldState = scaffoldState,
drawerContent = {
AppDrawer(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class RegisterFragment : Fragment(), OnSyncListener {
.collectAsLazyPagingItems()

Scaffold(
drawerGesturesEnabled = scaffoldState.drawerState.isOpen,
drawerGesturesEnabled = true,
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drawerGesturesEnabled is now always true, which allows opening the drawer via edge-swipe even when this screen is configured with toolBarHomeNavigation = NAVIGATE_BACK (e.g., see RegisterFragmentTest where this argument is explicitly set). That bypasses the intended navigation mode and can expose the drawer when the UI is supposed to behave as a back-only screen. Consider enabling gestures only when the toolbar home mode is OPEN_DRAWER (while still allowing swipe-to-close when the drawer is already open).

Suggested change
drawerGesturesEnabled = true,
drawerGesturesEnabled = scaffoldState.drawerState.isOpen,

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my other comment below

Comment thread
ellykits marked this conversation as resolved.
Outdated
scaffoldState = scaffoldState,
drawerContent = {
AppDrawer(
Expand Down
Loading