[Fix] #138 - 보관함 셀 탭 오류 및 viewWillAppear fetch 이벤트 수정#141
Merged
L-j-h-c merged 2 commits intoTeamRecorDream:developfrom Feb 3, 2023
Merged
[Fix] #138 - 보관함 셀 탭 오류 및 viewWillAppear fetch 이벤트 수정#141L-j-h-c merged 2 commits intoTeamRecorDream:developfrom
L-j-h-c merged 2 commits intoTeamRecorDream:developfrom
Conversation
EunHee-Jeong
approved these changes
Feb 3, 2023
Comment on lines
+214
to
+221
| let viewWillAppear = self.rx.viewWillAppear | ||
| .do { [weak self] _ in | ||
| guard let self = self else { return } | ||
| self.dreamFilterCollectionView.selectItem( | ||
| at: .init(row: 0, section: 0), | ||
| animated: false, | ||
| scrollPosition: .top) | ||
| } |
Member
There was a problem hiding this comment.
옹 이런 식으로 viewWillAppear를 빼주면 필터에서 선택된 셀이 바뀔 때마다 패치해올 수 있겠군요 !!! 훨씬 좋다 👍👍
Contributor
Author
There was a problem hiding this comment.
@EunHee-Jeong 요 부분은 viewWillAppear 시에 선택된 필터 셀을 0으로 초기화해주기 위해 넣은 부분이에요~~
Comment on lines
+53
to
+73
| input.filterButtonTapped | ||
| .withUnretained(self) | ||
| .subscribe(onNext: { owner, selectedType in | ||
| owner.useCase.execute(requestValue: .init(filterType: selectedType)) | ||
| owner.previousFetchQuery = .init(filterType: selectedType) | ||
| }).disposed(by: disposeBag) | ||
|
|
||
| input.viewWillAppear.subscribe(onNext: { _ in | ||
| self.useCase.execute(requestValue: .init(filterType: 0)) | ||
| output.loadingStatus.accept(true) | ||
| }).disposed(by: disposeBag) | ||
| input.viewWillAppear | ||
| .withUnretained(self) | ||
| .subscribe(onNext: { owner, _ in | ||
| owner.useCase.execute(requestValue: .init(filterType: 0)) | ||
| owner.previousFetchQuery = .init(filterType: 0) | ||
| output.loadingStatus.accept(true) | ||
| }).disposed(by: disposeBag) | ||
|
|
||
| input.dismissDetail | ||
| .withUnretained(self) | ||
| .subscribe(onNext: { owner, _ in | ||
| owner.useCase.execute(requestValue: owner.previousFetchQuery) | ||
| output.loadingStatus.accept(true) | ||
| }).disposed(by: disposeBag) |
Member
There was a problem hiding this comment.
필터가 눌렸을 때 previousFetchQuery 를 킵해두고, 새롭게 패치해야 하는 상황과 유지해야 하는 상황 모두에 사용했네요 와우 이거 대박이군... 근데 내가 이해한 게 맞나...?!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
👻 작업한 내용
보관함 셀 탭 오류 및 viewWillAppear fetch 이벤트 수정
🎤 PR Point
📮 관련 이슈