Skip to content
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

#171 [hotfix] 데일리 루틴 테마 리스트 조회할 때, 기본값을 고정으로 전달해서 테마 리스트가 변동할 경우 순서 안맞는 이슈 해결 #172

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ class DailyRoutineAddActivity :
setStatusBarColorFromResource(R.color.background)

dailyRoutineAddViewModel.getThemeList()
dailyRoutineAddViewModel.setThemeId(6)
dailyRoutineAddViewModel.themeList.observe(this){list ->
if(list.isNotEmpty()){
dailyRoutineAddViewModel.setThemeId(list[0].themeId)
}
}
setupAdapter()
setupList()
setIndicator()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class DailyRoutineAddViewModel @Inject constructor(

fun getDailyRoutine() {
viewModelScope.launch {
getRoutineDailyThemeListUseCase(themeId.value ?: 6)
getRoutineDailyThemeListUseCase(themeId.value ?: _themeList.value?.get(0)?.themeId ?: 5)
.onSuccess { response ->
_dailyRoutineCardThemeList.value = response
}
Expand Down
Loading