Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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 @@ -44,7 +44,7 @@ public final class DropDownBox: UIStackView {
tableView.layer.cornerRadius = 8
tableView.layer.borderColor = UIColor.neutral300.cgColor
tableView.separatorStyle = .none
tableView.isScrollEnabled = false
tableView.isScrollEnabled = true
tableView.contentInset = UIEdgeInsets(top: 4, left: 0, bottom: 4, right: 0)
tableView.register(DropDownBoxCell.self, forCellReuseIdentifier: "DropDownCell")
return tableView
Expand Down Expand Up @@ -124,7 +124,8 @@ private extension DropDownBox {
isExpanded.toggle()
tableView.isHidden = !isExpanded
iconButton.setImage(isExpanded ? DesignSystemAsset.image(named: "arrowDropUp") : DesignSystemAsset.image(named: "arrowDropdown"), for: .normal)
let height = CGFloat(items.count) * 44 + tableView.contentInset.top + tableView.contentInset.bottom
let visibleCount = min(items.count, 4)
let height = CGFloat(visibleCount) * 44 + tableView.contentInset.top + tableView.contentInset.bottom
Comment thread
dongglehada marked this conversation as resolved.
tableViewHeightConstraint?.update(offset: isExpanded ? height : 0)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public final class ParseItemFilterResultUseCaseImpl: ParseItemFilterResultUseCas
"폴암": 18, "활": 19, "석궁": 20, "아대": 21, "너클": 22, "건": 23, "모자": 24, "상의": 25,
"하의": 26, "전신갑옷": 27, "신발": 28, "장갑": 29, "방패": 31, "망토": 30,
"얼굴장식": 32, "눈장식": 33, "귀고리": 34, "반지": 35, "펜던트": 36,
"벨트": 37, "어깨장식": 38, "화살": 81, "표창": 83,
"벨트": 37, "어깨장식": 38, "화살": 81, "불릿": 82, "표창": 83,
"한손검주문서": 50, "한손도끼주문서": 51, "한손둔기주문서": 52,
"단검주문서": 53, "완드주문서": 55, "스태프주문서": 56, "두손검주문서": 57,
"두손도끼주문서": 58, "두손둔기주문서": 59, "창주문서": 60, "폴암주문서": 61,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public final class ItemFilterBottomSheetReactor: Reactor {
var sections: [String] = ["직업/레벨", "무기", "발사체", "방어구", "장신구", "주문서", "기타"]
var jobs: [String] = ["없음", "공용", "마법사", "전사", "궁수", "도적", "해적"]
var weapons: [String] = ["한손검", "한손도끼", "한손둔기", "창", "단검", "두손검", "두손도끼", "두손둔기", "폴암", "활", "석궁", "완드", "스태프", "아대", "건", "너클"]
var projectiles: [String] = ["화살", "표창"] // 불렛은 제거
var projectiles: [String] = ["화살", "표창", "불릿"]
var armors: [String] = ["모자", "상의", "하의", "장갑", "신발", "방패", "전신갑옷"] // 전신 = 전신갑옷?
var accessories: [String] = ["귀고리", "망토", "훈장", "눈장식", "얼굴장식", "팬던트", "벨트", "반지", "어깨장식"] // 귀장식 데이터 안줌 -> 귀장식 = 귀고리, 훈장은 서버에서 데이터 안줌.
@Pulse var scrollCategories: [String] = ["무기 주문서", "방어구 주문서", "기타 주문서"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public extension SetCharacterViewController {

reactor.state
.map { $0.isLevelValid }
.observe(on: MainScheduler.instance)
.distinctUntilChanged()
.withUnretained(self)
.subscribe { owner, isLevelValid in
Expand All @@ -114,6 +115,7 @@ public extension SetCharacterViewController {

reactor.state
.map { $0.isButtonEnabled }
.observe(on: MainScheduler.instance)
.bind(to: mainView.nextButton.rx.isEnabled)
.disposed(by: disposeBag)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ final class RecommendationMainReactor: Reactor {
case setLastDeleted(RecommendationMap?)
case setUIEvent(UIEvent)
case setTogglingBookmark(mapId: Int)
case setHideCommentView(Bool)
}

struct State {
Expand All @@ -45,6 +46,7 @@ final class RecommendationMainReactor: Reactor {
var lastDeleted: RecommendationMap?
var togglingBookmarkIds: Set<Int> = []
@Pulse var uiEvent: UIEvent = .none
var shouldHideCommentView: Bool = false
}

// MARK: - Properties
Expand Down Expand Up @@ -124,6 +126,7 @@ final class RecommendationMainReactor: Reactor {
}

return Observable.concat([
.just(.setHideCommentView(true)),
.just(.setLoading(true)),
Observable.merge([
fetchAll,
Expand Down Expand Up @@ -177,6 +180,8 @@ final class RecommendationMainReactor: Reactor {
newState.uiEvent = event
case let .setTogglingBookmark(mapId):
newState.togglingBookmarkIds.insert(mapId)
case let .setHideCommentView(hide):
newState.shouldHideCommentView = hide
}
return newState
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,17 @@ extension RecommendationMainViewController {

bindProfile(reactor: reactor)

reactor.state
.observe(on: MainScheduler.instance)
.map { $0.shouldHideCommentView }
.distinctUntilChanged()
.filter { $0 }
.withUnretained(self)
.subscribe { owner, _ in
(owner.tabBarController as? BottomTabBarController)?.checkRecommendationFirstLaunch(isFirst: true)
}
Comment thread
dongglehada marked this conversation as resolved.
.disposed(by: disposeBag)

reactor.state
.observe(on: MainScheduler.instance)
.map { $0.recommendations }
Expand Down
1 change: 1 addition & 0 deletions MLS/MLSRecommendationFeatureExample/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
RecommendationMainFactoryImpl(
repository: MockRecommendationRepository(),
bookmarkRepository: MockBookmarkRepository(),
recommendationUserDefaultsRepository: RecommendationUserDefaultsRepositoryImpl(),
makeLoginVC: {
let vc = UIViewController()
vc.view.backgroundColor = .white
Expand Down
Loading