Skip to content

Commit e5599e6

Browse files
authored
add refresh (#4)
1 parent 509c524 commit e5599e6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/kotlin/com/mineinabyss/guiy/navigation/Navigator.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ class Navigator<T>(val default: () -> T) {
2727
open(default())
2828
}
2929

30+
fun refresh() {
31+
screens.clear()
32+
open(screen ?: default())
33+
}
34+
3035
/**
3136
* Entrypoint for handling composition based on screen.
3237
*

0 commit comments

Comments
 (0)