Skip to content

[FIX] 카테고리 중복 검사 IllegaStateException 버그 수정 #875

@KxxHyoRim

Description

@KxxHyoRim

📝 DESCRIPTION

image

☑ TODO

  • _existingCategoryList이 null로 초기화 되는것으로 예상
  • 해당 코드 수정 예정
    fun getExistingCategoryList() {
        viewModelScope.launch {
            kotlin.runCatching {
                RetrofitObject.provideHavitApi(token).getAllCategories().data ?: emptyList()
            }.onSuccess { categoryList ->
                val tmp: MutableList<String> = mutableListOf()
                for (element in categoryList) tmp.add(element.title)
                _existingCategoryList.value = tmp
                _enterCategoryNameViewState.value = NetworkStatus.Success()
            }.onFailure {
                _enterCategoryNameViewState.value = NetworkStatus.Error(throwable = it)
            }
        }
    }

Metadata

Metadata

Assignees

Labels

FIX버그, 오류 해결HYORIM😎효림

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions