diff --git a/project/Plugins/ConfigurationPlugin/ProjectDescriptionHelpers/InfoPlist.swift b/project/Plugins/ConfigurationPlugin/ProjectDescriptionHelpers/InfoPlist.swift index 2049e446..213ae1b5 100644 --- a/project/Plugins/ConfigurationPlugin/ProjectDescriptionHelpers/InfoPlist.swift +++ b/project/Plugins/ConfigurationPlugin/ProjectDescriptionHelpers/InfoPlist.swift @@ -13,7 +13,7 @@ public enum IdleInfoPlist { "CFBundleDisplayName": "$(BUNDLE_DISPLAY_NAME)", - "CFBundleShortVersionString" : "1.0.2", + "CFBundleShortVersionString" : "1.0.3", "NSAppTransportSecurity" : [ "NSAllowsArbitraryLoads" : true diff --git a/project/Projects/App/Sources/DIAssembly/DataAssembly.swift b/project/Projects/App/Sources/DIAssembly/DataAssembly.swift index 31714a6e..154aeef2 100644 --- a/project/Projects/App/Sources/DIAssembly/DataAssembly.swift +++ b/project/Projects/App/Sources/DIAssembly/DataAssembly.swift @@ -22,13 +22,13 @@ public struct DataAssembly: Assembly { // MARK: Key-value store for datasource container.register(KeyValueStore.self) { _ in - return KeyChainList() + KeyChainList() } .inObjectScope(.container) // MARK: Service container.register(LocalStorageService.self) { _ in - return DefaultLocalStorageService() + DefaultLocalStorageService() } container.register((any ApplyService).self) { _ in DefaultApplyService() diff --git a/project/Projects/App/Sources/DIAssembly/LoggerAssembly.swift b/project/Projects/App/Sources/DIAssembly/LoggerAssembly.swift index 2772a77b..8d5fa0c9 100644 --- a/project/Projects/App/Sources/DIAssembly/LoggerAssembly.swift +++ b/project/Projects/App/Sources/DIAssembly/LoggerAssembly.swift @@ -23,11 +23,11 @@ public struct LoggerAssembly: Assembly { #endif return AmplitudeLogger() } + .inObjectScope(.container) // MARK: Overall logger - container.register(OverallLogger.self) { resolver in - let messagePublisher = resolver.resolve(LoggerMessagePublisher.self)! - return DefaultOverallLogger(publisher: messagePublisher) + container.register(OverallLogger.self) { _ in + DefaultOverallLogger() } .inObjectScope(.container) diff --git a/project/Projects/Data/Repository/DefaultNotificationsRepository.swift b/project/Projects/Data/Repository/DefaultNotificationsRepository.swift index ae2f07ae..d0669076 100644 --- a/project/Projects/Data/Repository/DefaultNotificationsRepository.swift +++ b/project/Projects/Data/Repository/DefaultNotificationsRepository.swift @@ -56,7 +56,8 @@ extension NotificationItemDTO: EntityRepresentable { public func toEntity() -> Entity { - let dateFormatter = ISO8601DateFormatter() + let dateFormatter = DateFormatter() + dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss" var createdDate: Date = .now if let formatted = dateFormatter.date(from: createdAt) { diff --git a/project/Projects/Presentation/DSKit/Sources/Component/TextField/MultiLineTextField.swift b/project/Projects/Presentation/DSKit/Sources/Component/TextField/MultiLineTextField.swift index c226d1ec..e5eab911 100644 --- a/project/Projects/Presentation/DSKit/Sources/Component/TextField/MultiLineTextField.swift +++ b/project/Projects/Presentation/DSKit/Sources/Component/TextField/MultiLineTextField.swift @@ -96,7 +96,7 @@ public class MultiLineTextField: UITextView { placeHolderLabel.topAnchor.constraint(equalTo: frameGuide.topAnchor, constant: textContainerInset.top), placeHolderLabel.leftAnchor.constraint(equalTo: frameGuide.leftAnchor, constant: textContainerInset.left), placeHolderLabel.rightAnchor.constraint(equalTo: frameGuide.rightAnchor, constant: -textContainerInset.right), - placeHolderLabel.bottomAnchor.constraint(equalTo: frameGuide.bottomAnchor, constant: -textContainerInset.bottom), + ]) } diff --git a/project/Projects/Presentation/Feature/Base/Sources/BaseVC/PopToDismissNC.swift b/project/Projects/Presentation/Feature/Base/Sources/BaseVC/PopToDismissNC.swift new file mode 100644 index 00000000..80da4aeb --- /dev/null +++ b/project/Projects/Presentation/Feature/Base/Sources/BaseVC/PopToDismissNC.swift @@ -0,0 +1,44 @@ +// +// PopToDismissNC.swift +// BaseFeature +// +// Created by choijunios on 10/28/24. +// + +import UIKit + +public class PopToDismissNavigationController: UINavigationController { + + private var duringTransition = false + + public override func viewDidLoad() { + super.viewDidLoad() + + interactivePopGestureRecognizer?.delegate = self + delegate = self + } + + public override func pushViewController(_ viewController: UIViewController, animated: Bool) { + duringTransition = true + + super.pushViewController(viewController, animated: animated) + } + +} + +extension PopToDismissNavigationController: UINavigationControllerDelegate { + public func navigationController(_ navigationController: UINavigationController, didShow viewController: UIViewController, animated: Bool) { + self.duringTransition = false + } +} + +extension PopToDismissNavigationController: UIGestureRecognizerDelegate { + public func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool { + guard gestureRecognizer == interactivePopGestureRecognizer, + let _ = topViewController else { + return true // default value + } + + return viewControllers.count > 1 && duringTransition == false + } +} diff --git a/project/Projects/Presentation/Feature/Base/Sources/Router/Router.swift b/project/Projects/Presentation/Feature/Base/Sources/Router/Router.swift index 6375fcb1..e491900c 100644 --- a/project/Projects/Presentation/Feature/Base/Sources/Router/Router.swift +++ b/project/Projects/Presentation/Feature/Base/Sources/Router/Router.swift @@ -215,7 +215,7 @@ public final class Router: NSObject, RouterProtocol { guard let keyWindow = UIWindow.keyWindow else { return } - let navigationController = UINavigationController(rootViewController: module) + let navigationController = PopToDismissNavigationController(rootViewController: module) navigationController.setNavigationBarHidden(true, animated: false) self.rootController = navigationController @@ -245,7 +245,7 @@ public final class Router: NSObject, RouterProtocol { public func setRootModuleTo(module: Module, popCompletion: RoutingCompletion?) { guard let keyWindow = UIWindow.keyWindow else { return } - let navigationController = UINavigationController(rootViewController: module) + let navigationController = PopToDismissNavigationController(rootViewController: module) navigationController.setNavigationBarHidden(true, animated: false) if let popCompletion { diff --git a/project/Projects/Presentation/Feature/NotificationPage/Sources/NotificationPageModule/NotificationPageVC.swift b/project/Projects/Presentation/Feature/NotificationPage/Sources/NotificationPageModule/NotificationPageVC.swift index 6d1aacaa..fe5f637c 100644 --- a/project/Projects/Presentation/Feature/NotificationPage/Sources/NotificationPageModule/NotificationPageVC.swift +++ b/project/Projects/Presentation/Feature/NotificationPage/Sources/NotificationPageModule/NotificationPageVC.swift @@ -50,7 +50,7 @@ enum SectionInfo: Int, CaseIterable { } -class NotificationPageVC: BaseViewController { +class NotificationPageVC: BaseViewController, UIGestureRecognizerDelegate { typealias Cell = NotificationCell @@ -118,7 +118,7 @@ class NotificationPageVC: BaseViewController { tableView.dataSource = tableViewDataSource tableView.delegate = self tableView.rowHeight = UITableView.automaticDimension - tableView.estimatedRowHeight = 93 + tableView.estimatedRowHeight = 102 tableView.sectionHeaderTopPadding = 10 // MARK: Cell tableView.separatorStyle = .none diff --git a/project/Projects/Presentation/Feature/NotificationPage/Sources/NotificationPageModule/View/NotificationCell.swift b/project/Projects/Presentation/Feature/NotificationPage/Sources/NotificationPageModule/View/NotificationCell.swift index 653ddc51..e4cc89ed 100644 --- a/project/Projects/Presentation/Feature/NotificationPage/Sources/NotificationPageModule/View/NotificationCell.swift +++ b/project/Projects/Presentation/Feature/NotificationPage/Sources/NotificationPageModule/View/NotificationCell.swift @@ -71,7 +71,7 @@ class NotificationCell: UITableViewCell { let mainStack = HStack([ profileImageView, labelStack, - ], spacing: 16, alignment: .top) + ], spacing: 20, alignment: .center) [ mainStack diff --git a/project/Projects/Presentation/Feature/NotificationPage/Sources/NotificationPageModule/ViewModel/NotificationPageViewModel.swift b/project/Projects/Presentation/Feature/NotificationPage/Sources/NotificationPageModule/ViewModel/NotificationPageViewModel.swift index f27c6418..f98476d4 100644 --- a/project/Projects/Presentation/Feature/NotificationPage/Sources/NotificationPageModule/ViewModel/NotificationPageViewModel.swift +++ b/project/Projects/Presentation/Feature/NotificationPage/Sources/NotificationPageModule/ViewModel/NotificationPageViewModel.swift @@ -139,7 +139,7 @@ class NotificationPageViewModel: BaseViewModel, NotificationPageViewModelable { // 날짜순 정렬 let sortedInfo = accum.sorted { lhs, rhs in - lhs.createdDate < rhs.createdDate + lhs.createdDate > rhs.createdDate } var result: [SectionInfo: [NotificationVO]] = [:] diff --git a/project/Projects/Presentation/Feature/Root/Sources/Logger/OverallLogger/OverallLogger.swift b/project/Projects/Presentation/Feature/Root/Sources/Logger/OverallLogger/OverallLogger.swift index aaf13f25..d6197492 100644 --- a/project/Projects/Presentation/Feature/Root/Sources/Logger/OverallLogger/OverallLogger.swift +++ b/project/Projects/Presentation/Feature/Root/Sources/Logger/OverallLogger/OverallLogger.swift @@ -6,10 +6,12 @@ // import Foundation + import PresentationCore import AuthFeature import CenterMainPageFeature import Domain +import Core public protocol OverallLogger: CenterRegisterLogger, @@ -20,11 +22,9 @@ public protocol OverallLogger: public class DefaultOverallLogger { - let publisher: LoggerMessagePublisher + @Injected var publisher: LoggerMessagePublisher - public init(publisher: LoggerMessagePublisher) { - self.publisher = publisher - } + public init() { } } extension DefaultOverallLogger: OverallLogger { diff --git a/project/Projects/Presentation/Feature/UserProfile/Sources/CenterProfile/CenterProfileViewModel.swift b/project/Projects/Presentation/Feature/UserProfile/Sources/CenterProfile/CenterProfileViewModel.swift index 06b181f2..557002cc 100644 --- a/project/Projects/Presentation/Feature/UserProfile/Sources/CenterProfile/CenterProfileViewModel.swift +++ b/project/Projects/Presentation/Feature/UserProfile/Sources/CenterProfile/CenterProfileViewModel.swift @@ -201,6 +201,7 @@ class CenterProfileViewModel: BaseViewModel, CenterProfileViewModelable { let editingRequestResult = mapEndLoading(imageProcessingFinishWithSuccess .unretained(self) + .observe(on: ConcurrentDispatchQueueScheduler(qos: .default)) .flatMap { (obj, imageInfo) in let (phoneNumber, introduction) = obj.checkTextInputModification()