Commit bf87d9c
committed
Refactor: Move name validation to OnboardingViewModel
Moved the user name validation logic from OnboardingScreen (Composable) to OnboardingViewModel.
Changed validation from isNotEmpty() to isNotBlank() to prevent saving whitespace-only names.
This improves separation of concerns and testability.1 parent ed0e88e commit bf87d9c
File tree
2 files changed
+5
-5
lines changed- app/src/main/java/com/example/theloop
- ui/screens
2 files changed
+5
-5
lines changedLines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
103 | | - | |
| 101 | + | |
104 | 102 | | |
105 | 103 | | |
106 | 104 | | |
| |||
0 commit comments