Commit 700e666
committed
Migrate to NavKey
The `Screen` sealed class now implements the `NavKey` interface from the navigation library and is marked as `@Serializable`. This change removes the manual `remember { mutableStateListOf<Screen>(PopularMovies) }` in favor of a new `rememberNavBackStack` composable function, which utilizes `rememberSerializable` with a `NavBackStackSerializer` for better state restoration.1 parent 366d6c0 commit 700e666
File tree
2 files changed
+25
-8
lines changed- app/src/main/java/io/github/lordraydenmk/themoviedbapp
- movies
2 files changed
+25
-8
lines changedLines changed: 18 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 4 | + | |
7 | 5 | | |
| 6 | + | |
8 | 7 | | |
| 8 | + | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | | - | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | | - | |
21 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
22 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
23 | 34 | | |
24 | 35 | | |
25 | 36 | | |
26 | 37 | | |
27 | 38 | | |
28 | 39 | | |
29 | 40 | | |
30 | | - | |
| 41 | + | |
31 | 42 | | |
32 | 43 | | |
33 | 44 | | |
| |||
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
| 5 | + | |
4 | 6 | | |
5 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
| 11 | + | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
0 commit comments