Skip to content

Conversation

doTTTTT
Copy link
Contributor

@doTTTTT doTTTTT commented Sep 3, 2025

No description provided.

@doTTTTT doTTTTT requested a review from florent37 September 3, 2025 07:42
@doTTTTT doTTTTT self-assigned this Sep 3, 2025
@doTTTTT doTTTTT added the enhancement New feature or request label Sep 3, 2025
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
Copy link
Contributor

Choose a reason for hiding this comment

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

delete this file

*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
Copy link
Contributor

Choose a reason for hiding this comment

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

delete this file

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
Copy link
Contributor

Choose a reason for hiding this comment

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

delete this file

@@ -0,0 +1,16 @@
package io.github.openflocon.navigation

class FloconNavigationState internal constructor() {
Copy link
Contributor

Choose a reason for hiding this comment

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

please :

  1. split into interface/impl
interface FloconNavigationState {
    val stack: State<List<FloconRoute>>

    fun navigate(route: FloconRoute)

    fun back(count: Int = 1)
}
  1. use a mutable state & collect
    // not sure mutableStateListOf exists, maybe mutableStateOf<List>(
class FloconNavigationState internal constructor() {

    private val _stack = mutableStateListOf<FloconRoute>(LoadingRoute)
    val stack: State<List<FloconRoute>> = _stack

    fun navigate(route: FloconRoute) {
        _stack.add(route)
    }

    fun back(count: Int = 1) {
        repeat(count) { _stack.removeLast() }
    }

}
val stack by navigationState.stack

@doTTTTT doTTTTT linked an issue Oct 15, 2025 that may be closed by this pull request
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.

Use Navigation3

2 participants