Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MediaUI] Don't encode null into route when navigating to a media item #1465

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

dabluck
Copy link
Contributor

@dabluck dabluck commented Jul 2, 2023

WHAT

When selecting a media item with a null collection, the route becomes
mediaItem?id=<id>null

I don't think this is the intended behavior. Instead we should skip the collection argument entirely in that case. Otherwise when parsing the argument you have to deal with the null at the end.

The sample app doesn't seem to call this function. I tried to add a simple unit test here but it doesn't look like there's any test coverage in the file so I think it'd be a lot of setup. Let me know if you want to me try though.

Thanks

Checklist 📋

  • Add explicit visibility modifier and explicit return types for public declarations
  • Run spotless check
  • Run tests
  • Update metalava's signature text files

Sorry, something went wrong.

@yschimke
Copy link
Collaborator

yschimke commented Jul 3, 2023

@dabluck thanks for the fix!

@yschimke yschimke merged commit 1b6ea11 into google:main Jul 3, 2023
Kpeved pushed a commit that referenced this pull request Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants