-
Notifications
You must be signed in to change notification settings - Fork 32
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
전남대 Android_이민서_5주차 과제_Step 2 #73
base: leeminseo00
Are you sure you want to change the base?
전남대 Android_이민서_5주차 과제_Step 2 #73
Conversation
* Initial commit * 충남대 Android_김선규 4주차 Step0 (#10) * Initial commit * Merge : android-map-keyword into android-map-search (#8) * 충남대 Android_김선규 3주차 과제 Step1 (#47) * docs: add step1 requirements * chore: set for using android api * style: rename id in layout * feat: remove storeInfo for using api * feat: add connecting api for searching * style: rename variable name proper * 충남대 Android_김선규 3주차 과제 Step2 (#85) * style: function rename and split * feat: Change function to fit coroutine * docs: add step2 requirements * style: move from main to sub file * chore: set it up to work in the right environment * feat: display kakao map, when app is started --------- Co-authored-by: MyStoryG <[email protected]> * 충남대 Android_김선규 4주차 Step 1 제출 (#47) * docs: add week 4 step 1 requirements * feat: add searching by saved search keyword * chore: relocate files proper * feat: modify adapter to make clean code * feat: add image for marker * feat: add layout for displaying bottom sheet * feat: add parcelabel for easy to send data * feat: add displaying search result * refactor: modify class structure * feat: add error screen and reload button * feat: add saving and loading last position when app is closed, save last position when app is opened, load last position * 충남대 Android_김선규 4주차 Step2 수정 (#73) * style: rename variable name * feat: add viewModel and Repository for saving last position * refactor: classify in more detail * test: add android UI test * chore: add mockk test dependency * test: add ViewModel test * chore: add testOptions * test: modify android ui test --------- Co-authored-by: MyStoryG <[email protected]>
binding.searchRecyclerView.visibility = if (results.isEmpty()) View.GONE else View.VISIBLE | ||
binding.noResult.visibility = if (results.isEmpty())View.VISIBLE else View.GONE | ||
binding.savedSearchRecyclerView.visibility = if (results.isEmpty()) View.GONE else View.VISIBLE | ||
viewModel.setSearchRecyclerViewVisibility(results.isNotEmpty()) |
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.
뷰모델의 값이 발행된 곳에서 또다시 ViewModel의 값을 변경하는 코드는 조금 이상한 것 같아요.
뷰모델에서 값을 발행하기전에 판단할 수 있지 않을까요?
|
||
private val _searchResults = MutableLiveData<List<Document>>() | ||
val searchResults: LiveData<List<Document>> get() = _searchResults | ||
private val _noResultsVisible = MutableLiveData<Boolean>() |
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.
뷰를 표현하기 위한 데이터 클래스를 정의하여 활용하도록 변경해보세요. 뷰모델의 코드를 간결하게 만들 수 있습니다.
과제 요구사항이 만족되도록 코드 잘 작성해주셨습니다. :) |
* style: rename variable name * feat: add viewModel and Repository for saving last position * refactor: classify in more detail * test: add android UI test * chore: add mockk test dependency * test: add ViewModel test * chore: add testOptions * test: modify android ui test
5주차 과제_Step 2
리팩터링: 아키텍처 패턴
코드 작성하며 어려웠던 점
멘토님이 중점적으로 리뷰 해주셨으면 하는 부분