Commit 214e487
committed
Refactor: Fix silent failure in name validation
Updated `OnboardingViewModel.saveName` to return a `Boolean` indicating success.
Updated `OnboardingScreen` to check this return value and show a Toast message if validation fails, preventing navigation to the next step.
This addresses the feedback that the previous refactoring allowed users to proceed with a blank name.1 parent bf87d9c commit 214e487
File tree
2 files changed
+7
-2
lines changed- app/src/main/java/com/example/theloop
- ui/screens
2 files changed
+7
-2
lines changedLines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
102 | 105 | | |
103 | 106 | | |
104 | 107 | | |
| |||
0 commit comments