-
Notifications
You must be signed in to change notification settings - Fork 0
[FIX/#143] 2์ฐจ qa #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX/#143] 2์ฐจ qa #148
Changes from 4 commits
3552b7c
951713b
4b16d0b
1c38c27
5f8a10e
d3bba74
e34e47e
2987191
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,22 +40,26 @@ class HomeViewModel @Inject constructor( | |
| _uiState.update { UiState.Loading } | ||
|
|
||
| homeRepository.getMainDashboard().onSuccess { response -> | ||
| val level = response.cherryLevel | ||
| val safeIndex = level.coerceIn( | ||
| 1, | ||
| CherrishGaugeType.entries.lastIndex | ||
| ) | ||
| _uiState.update { | ||
| UiState.Success( | ||
| HomeUiState( | ||
| currentStep = response.cherryLevel, | ||
| currentStep = level, | ||
| gauges = CherrishGaugeType.entries.toImmutableList(), | ||
| challengeRate = response.challengeRate, | ||
| challengeName = response.challengeName, | ||
| todayDate = response.toTodayDateString(), | ||
| plans = response.recentProcedures.toImmutableList(), | ||
| upcomingPlans = response.upcomingProcedures.toImmutableList(), | ||
| selectedIndex = (response.cherryLevel - 1) | ||
| .coerceIn(0, CherrishGaugeType.entries.size - 1) | ||
| selectedIndex = safeIndex | ||
| ) | ||
|
Comment on lines
+43
to
59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LEVEL0 ํฌํจ ์ ์ํ ๋ถ์ผ์น ๊ฐ๋ฅ์ฑ ์์ต๋๋ค. ํ์ฌ ๐ง ์ ์ ์์ - val level = response.cherryLevel
- val safeIndex = level.coerceIn(
- 1,
- CherrishGaugeType.entries.lastIndex
- )
+ val level = response.cherryLevel
+ val safeLevel = level.coerceIn(
+ 0,
+ CherrishGaugeType.entries.lastIndex
+ )
...
- currentStep = level,
+ currentStep = safeLevel,
...
- selectedIndex = safeIndex
+ selectedIndex = safeLevel๐ค Prompt for AI Agents |
||
| ) | ||
| } | ||
| }.onLogFailure {} | ||
| }.onLogFailure { } | ||
| } | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ฒ์ด์ง ๋จ๊ณ์ ์ฒด๋ฆฌ ํ์ ๊ณ์ฐ์ด ์๋ก ๋ถ์ผ์นํ ์ ์์ต๋๋ค.
gaugeStep๋ ํด๋จํ๋์ง๋งstepForCherry๋ ์๋ณธcherryLevel์ ์ฌ์ฉํฉ๋๋ค. ๋ฒ์๋ฅผ ๋ฒ์ด๋ ๊ฐ์ด ์ค๋ฉด ๊ฒ์ด์ง๋ ์ต๋์ธ๋ฐ ์ฒด๋ฆฌ ํ์ ์ ๊ธฐ๋ณธ๊ฐ(MONGRONG)์ผ๋ก ๋จ์ด์ ธ UI๊ฐ ์๊ฐ๋ฆด ์ ์์ด์. ๋์ผํ ๊ธฐ์ค(ํด๋จํ๋ ๊ฐ)์ผ๋ก ์ ๋ ฌํ๋ ํธ์ด ์์ ํฉ๋๋ค.๐ ๏ธ ์ ์ ์์
๐ค Prompt for AI Agents