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

Adds getFragmentIndexInStackBySameType function to Navigator #53

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

bilgehankalkan
Copy link
Contributor

Adds getFragmentIndexInStackBySameType function to Navigator which will return index of the given Fragment tag's in its stack.

For the current fragment it will return 0, for the fragment before that, it will return 1.

  • Create tests for getFragmentIndexInStackBySameType in MultipleStackNavigatorBackstackOrderTest.
  • Use "kotlin-parcelize" plugin for StackItem.
  • Fix comments on Navigator.
  • Update library version to 0.11.0

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Motivation and Context

Required in a private project to modify fragment data according to its index in stack.

How Has This Been Tested?

Tested on a private project also created unit tests.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

- Create tests for `getFragmentIndexInStackBySameType` in `MultipleStackNavigatorBackstackOrderTest`.
- Use "kotlin-parcelize" plugin for `StackItem`.
- Fix comments on `Navigator`.
- Update library version to `0.11.0`
@bilgehankalkan bilgehankalkan merged commit 22f05b2 into master Feb 16, 2024
2 checks passed
@bilgehankalkan bilgehankalkan deleted the feature/fragment-stack-index-getter-with-tag branch February 16, 2024 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants