diff --git a/MLS/MLSDesignSystem/Sources/MLSDesignSystem/Components/DropDownBox/DropDownBox.swift b/MLS/MLSDesignSystem/Sources/MLSDesignSystem/Components/DropDownBox/DropDownBox.swift index a1a3c2ce..7f885298 100644 --- a/MLS/MLSDesignSystem/Sources/MLSDesignSystem/Components/DropDownBox/DropDownBox.swift +++ b/MLS/MLSDesignSystem/Sources/MLSDesignSystem/Components/DropDownBox/DropDownBox.swift @@ -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 @@ -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 tableViewHeightConstraint?.update(offset: isExpanded ? height : 0) } diff --git a/MLS/MLSDictionaryFeature/Sources/MLSDictionaryFeature/Domain/Usecases/ParseItemFilterResultUseCaseImpl.swift b/MLS/MLSDictionaryFeature/Sources/MLSDictionaryFeature/Domain/Usecases/ParseItemFilterResultUseCaseImpl.swift index 19ae7fd9..db6fdba9 100644 --- a/MLS/MLSDictionaryFeature/Sources/MLSDictionaryFeature/Domain/Usecases/ParseItemFilterResultUseCaseImpl.swift +++ b/MLS/MLSDictionaryFeature/Sources/MLSDictionaryFeature/Domain/Usecases/ParseItemFilterResultUseCaseImpl.swift @@ -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, diff --git a/MLS/MLSDictionaryFeature/Sources/MLSDictionaryFeature/Presentation/ItemFilterBottomSheet/ItemFilterBottomSheetReactor.swift b/MLS/MLSDictionaryFeature/Sources/MLSDictionaryFeature/Presentation/ItemFilterBottomSheet/ItemFilterBottomSheetReactor.swift index 34596850..99b2c8ad 100644 --- a/MLS/MLSDictionaryFeature/Sources/MLSDictionaryFeature/Presentation/ItemFilterBottomSheet/ItemFilterBottomSheetReactor.swift +++ b/MLS/MLSDictionaryFeature/Sources/MLSDictionaryFeature/Presentation/ItemFilterBottomSheet/ItemFilterBottomSheetReactor.swift @@ -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] = ["무기 주문서", "방어구 주문서", "기타 주문서"] diff --git a/MLS/MLSMyPageFeature/Sources/MLSMyPageFeature/Presentation/SetCharacter/SetCharacterViewController.swift b/MLS/MLSMyPageFeature/Sources/MLSMyPageFeature/Presentation/SetCharacter/SetCharacterViewController.swift index 06a98eb7..42aa7582 100644 --- a/MLS/MLSMyPageFeature/Sources/MLSMyPageFeature/Presentation/SetCharacter/SetCharacterViewController.swift +++ b/MLS/MLSMyPageFeature/Sources/MLSMyPageFeature/Presentation/SetCharacter/SetCharacterViewController.swift @@ -103,6 +103,7 @@ public extension SetCharacterViewController { reactor.state .map { $0.isLevelValid } + .observe(on: MainScheduler.instance) .distinctUntilChanged() .withUnretained(self) .subscribe { owner, isLevelValid in @@ -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) diff --git a/MLS/MLSRecommendationFeature/Sources/MLSRecommendationFeature/Presentation/RecommendationMain/RecommendationMainReactor.swift b/MLS/MLSRecommendationFeature/Sources/MLSRecommendationFeature/Presentation/RecommendationMain/RecommendationMainReactor.swift index e34cad2c..624505d1 100644 --- a/MLS/MLSRecommendationFeature/Sources/MLSRecommendationFeature/Presentation/RecommendationMain/RecommendationMainReactor.swift +++ b/MLS/MLSRecommendationFeature/Sources/MLSRecommendationFeature/Presentation/RecommendationMain/RecommendationMainReactor.swift @@ -33,6 +33,7 @@ final class RecommendationMainReactor: Reactor { case setLastDeleted(RecommendationMap?) case setUIEvent(UIEvent) case setTogglingBookmark(mapId: Int) + case setHideCommentView(Bool) } struct State { @@ -45,6 +46,7 @@ final class RecommendationMainReactor: Reactor { var lastDeleted: RecommendationMap? var togglingBookmarkIds: Set = [] @Pulse var uiEvent: UIEvent = .none + var shouldHideCommentView: Bool = false } // MARK: - Properties @@ -124,6 +126,7 @@ final class RecommendationMainReactor: Reactor { } return Observable.concat([ + .just(.setHideCommentView(true)), .just(.setLoading(true)), Observable.merge([ fetchAll, @@ -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 } diff --git a/MLS/MLSRecommendationFeature/Sources/MLSRecommendationFeature/Presentation/RecommendationMain/RecommendationMainViewController.swift b/MLS/MLSRecommendationFeature/Sources/MLSRecommendationFeature/Presentation/RecommendationMain/RecommendationMainViewController.swift index 1f76138f..b9a41fa8 100644 --- a/MLS/MLSRecommendationFeature/Sources/MLSRecommendationFeature/Presentation/RecommendationMain/RecommendationMainViewController.swift +++ b/MLS/MLSRecommendationFeature/Sources/MLSRecommendationFeature/Presentation/RecommendationMain/RecommendationMainViewController.swift @@ -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) + } + .disposed(by: disposeBag) + reactor.state .observe(on: MainScheduler.instance) .map { $0.recommendations } diff --git a/MLS/MLSRecommendationFeatureExample/SceneDelegate.swift b/MLS/MLSRecommendationFeatureExample/SceneDelegate.swift index 1fbe974e..017d699a 100644 --- a/MLS/MLSRecommendationFeatureExample/SceneDelegate.swift +++ b/MLS/MLSRecommendationFeatureExample/SceneDelegate.swift @@ -33,6 +33,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { RecommendationMainFactoryImpl( repository: MockRecommendationRepository(), bookmarkRepository: MockBookmarkRepository(), + recommendationUserDefaultsRepository: RecommendationUserDefaultsRepositoryImpl(), makeLoginVC: { let vc = UIViewController() vc.view.backgroundColor = .white