-
Notifications
You must be signed in to change notification settings - Fork 0
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
드랍유도 컨텐츠 수정 작업 #299
base: develop
Are you sure you want to change the base?
드랍유도 컨텐츠 수정 작업 #299
Conversation
9622bca
to
fe41c5d
Compare
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.
지혜님 고생 많으셨습니다!
Suggestion 한 번 봐주시고 참고하셔서 적용 부탁드립니다~~
추가적으로 추천 음악 리스트 테이블 뷰로 구현해주셨는데
CompositionalLayout Section 의 orthogonalScrollingBehavior.groupPagingCentered 로 추후 변경한다면 UX가 더 개선될거 같습니다 :)
|
||
import UIKit | ||
|
||
class GuideDetailView: UIView { |
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.
class GuideDetailView: UIView { | |
final class GuideDetailView: UIView { |
import RxSwift | ||
import SnapKit | ||
|
||
class RecommendHeaderView: UICollectionReusableView { |
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.
class RecommendHeaderView: UICollectionReusableView { | |
final class RecommendHeaderView: UICollectionReusableView { |
|
||
import Kingfisher | ||
|
||
class RecommendKeywordCell: UICollectionViewCell { |
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.
class RecommendKeywordCell: UICollectionViewCell { | |
final class RecommendKeywordCell: UICollectionViewCell { |
Observable.merge( | ||
self.backButton.rx.tap.asObservable() | ||
) | ||
.bind { _ in | ||
self.navigationController?.popViewController(animated: true) | ||
} |
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.
Observable.merge( | |
self.backButton.rx.tap.asObservable() | |
) | |
.bind { _ in | |
self.navigationController?.popViewController(animated: true) | |
} | |
self.backButton.rx.tap | |
.bind(with: self) { owner, _ in | |
owner.navigationController?.popViewController(animated: true) | |
} |
@@ -18,39 +18,47 @@ protocol SearchingMusicViewModel: ViewModel { | |||
|
|||
final class DefaultSearchingMusicViewModel: SearchingMusicViewModel { | |||
private let model: SearchMusicUsecase |
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.
private let model: SearchMusicUsecase | |
private let searchMusicUseCase: SearchMusicUsecase |
await self.model.deleteRecentSearch(keyword: keyword) | ||
|
||
do { | ||
let recentQueries = try await self.model.getRecentSearches().value |
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.
await self.model.deleteRecentSearch(keyword: keyword) | |
do { | |
let recentQueries = try await self.model.getRecentSearches().value | |
await self.searchMusicUseCase.deleteRecentSearch(keyword: keyword) | |
do { | |
let recentQueries = try await self.searchMusicUseCase.getRecentSearches().value |
self.location = location | ||
} | ||
|
||
func convert(input: Input, disposedBag: DisposeBag) -> Output { | ||
let output = Output() | ||
|
||
input.viewDidAppearEvent | ||
input.viewDidLoadEvent | ||
.subscribe(onNext: { [weak self] in | ||
self?.model.getRecentSearches() |
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.
self?.model.getRecentSearches() | |
self?. searchMusicUseCase.getRecentSearches() |
input.keywordQueryDidPressEvent | ||
.bind { [weak self] keywordQuery in | ||
self?.searchMusic(output: output, keyword: keywordQuery) | ||
self?.model.saveRecentSearch(keyword: keywordQuery) |
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.
self?.model.saveRecentSearch(keyword: keywordQuery) | |
self?.searchMusicUseCase.saveRecentSearch(keyword: keywordQuery) |
|
||
import SnapKit | ||
|
||
class RecentSearchesHeaderView: UICollectionReusableView { |
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.
class RecentSearchesHeaderView: UICollectionReusableView { | |
final class RecentSearchesHeaderView: UICollectionReusableView { |
let titleLabel = UILabel() | ||
let arrowIconImageView = UIImageView() | ||
let infoIconButton = UIButton() |
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.
let titleLabel = UILabel() | |
let arrowIconImageView = UIImageView() | |
let infoIconButton = UIButton() | |
private let titleLabel = UILabel() | |
private let arrowIconImageView = UIImageView() | |
private let infoIconButton = UIButton() |
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.
지혜님 고생 많으셨습니다!! 아래 건의사항 하나만 봐주시면 감사하겠습니다 : )
func getMostDroppedMusicList() -> Single<[Music]> | ||
func getArtistList() -> Single<[Artist]> | ||
func getPromptOfTheDay() -> Single<String?> | ||
func getRecommendSections() -> Single<[RecommendSectionDTO]> |
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.
UseCase에서 네트워크 통신 DTO를 반환하도록 되어있는데,
혹시 DTO에 의해 매핑된 Entity를 두고 반환하게 하는 게 어떨까요??
DTO가 변경되도 Entity를 바라보는 Presentation Layer에선 변경점이 없도록 하면 유지보수성이 올라갈 것 같아서요! @thoonk
📌 드랍유도 컨텐츠 수정
open #298
내용
스크린샷