Skip to content

refactor(navigation): change backStack type to MutableList for improved flexibility#4

Open
maicol07 wants to merge 2 commits intoterrakok:mainfrom
maicol07:main
Open

refactor(navigation): change backStack type to MutableList for improved flexibility#4
maicol07 wants to merge 2 commits intoterrakok:mainfrom
maicol07:main

Conversation

@maicol07
Copy link
Copy Markdown

This way, it can also be used with different structures other than a SnapshotStateList (such as Compose NavBackState)

…ibility

This way it can also be used with different structures other than a `SnapshotStateList` (such as Compose NavBackState)
Copilot AI review requested due to automatic review settings February 25, 2026 14:14
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors the ChronologicalBrowserNavigation API to accept a List back stack (instead of SnapshotStateList) with the goal of supporting additional back stack implementations while keeping browser history and URL hash synchronized with in-app navigation.

Changes:

  • Changed ChronologicalBrowserNavigation and its internal binding function to accept List<T> instead of SnapshotStateList<T>.
  • Added runtime checks/casts to mutate the back stack only when the provided List is also a MutableList.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@maicol07
Copy link
Copy Markdown
Author

maicol07 commented Mar 3, 2026

@terrakok, will this be merged along with a new release?

@terrakok
Copy link
Copy Markdown
Owner

No. Browser integration requires a mutable stack

@maicol07
Copy link
Copy Markdown
Author

No. Browser integration requires a mutable stack

Ok, I can change it with a MutableList if you agree

… `backStack` and remove redundant type checks.
@maicol07 maicol07 changed the title refactor(navigation): change backStack type to List for improved flexibility refactor(navigation): change backStack type to MutableList for improved flexibility Mar 11, 2026
@maicol07
Copy link
Copy Markdown
Author

@terrakok changed to MutableList

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.

3 participants