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

refactor: Use Navigation Safe Args #5380

Merged

Conversation

Isira-Seneviratne
Copy link
Collaborator

No description provided.

@IndusAryan
Copy link
Contributor

@Isira-Seneviratne what does this do actually ?

@Isira-Seneviratne
Copy link
Collaborator Author

@Isira-Seneviratne what does this do actually ?

It allows navigating between fragments to be performed in a type-safe manner: https://developer.android.com/guide/navigation/use-graph/pass-data

@RafaelsRamos
Copy link
Contributor

My 2 cents. From my experience, SafeArgs brings to the table Safety at the expense of complexity.

By adding SafeArgs to a single navigation, we increase entropy and have 2 ways of handling arguments between fragments. If we decide to follow this approach, I suggest that we consider applying it to all other navigations.

@Isira-Seneviratne
Copy link
Collaborator Author

My 2 cents. From my experience, SafeArgs brings to the table Safety at the expense of complexity.

By adding SafeArgs to a single navigation, we increase entropy and have 2 ways of handling arguments between fragments. If we decide to follow this approach, I suggest that we consider applying it to all other navigations.

I've made the changes for existing navigations that require arguments, e.g. the channel fragment.

@Isira-Seneviratne Isira-Seneviratne merged commit 37de6a7 into libre-tube:master Dec 29, 2023
3 of 4 checks passed
@Isira-Seneviratne Isira-Seneviratne deleted the Navigation_safe_args branch January 1, 2024 01:42
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

4 participants