From d50f57186796b89cb32c81fafdc23b62efbf4d70 Mon Sep 17 00:00:00 2001 From: siwonLee <111dltldnjs@gmail.com> Date: Thu, 24 Oct 2024 00:53:53 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20`=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=ED=95=84?= =?UTF-8?q?=EC=9A=94`=20=EC=96=BC=EB=9F=BF=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Projects/App/Sources/AppCoordinator.swift | 20 ------------------- .../App/Sources/NSNotification.Name+.swift | 5 ----- .../Common/TokenRequestIntercepter.swift | 6 ------ 3 files changed, 31 deletions(-) delete mode 100644 Projects/App/Sources/NSNotification.Name+.swift diff --git a/Projects/App/Sources/AppCoordinator.swift b/Projects/App/Sources/AppCoordinator.swift index b5369bba..ce0a4b15 100644 --- a/Projects/App/Sources/AppCoordinator.swift +++ b/Projects/App/Sources/AppCoordinator.swift @@ -13,13 +13,6 @@ final class AppCoordinator: Coordinator { init(navigationController: UINavigationController) { self.navigationController = navigationController - - NotificationCenter.default.addObserver( - self, - selector: #selector(restartWithAlert), - name: .appRestart, - object: nil - ) } func start(animated: Bool) { @@ -62,17 +55,4 @@ extension AppCoordinator { mainTabCoordinator.parentCoordinator = self childCoordinators.append(mainTabCoordinator) } - - @objc func restartWithAlert(_ notification: Notification) { - let message = notification.userInfo?["message"] as? String - - DispatchQueue.main.async { - AlertsManager.show( - title: message ?? "앱을 재실행 합니다.", - type: .onlyOkButton { [weak self] in - self?.childCoordinators.forEach { $0.remove() } - self?.start(animated: false) - }) - } - } } diff --git a/Projects/App/Sources/NSNotification.Name+.swift b/Projects/App/Sources/NSNotification.Name+.swift deleted file mode 100644 index c0d1063e..00000000 --- a/Projects/App/Sources/NSNotification.Name+.swift +++ /dev/null @@ -1,5 +0,0 @@ -import Foundation - -public extension NSNotification.Name { - static let appRestart = NSNotification.Name("appRestart") // toggle Tab -} diff --git a/Projects/Core/Core/Sources/Network/Common/TokenRequestIntercepter.swift b/Projects/Core/Core/Sources/Network/Common/TokenRequestIntercepter.swift index 0625c9d4..e1097af2 100644 --- a/Projects/Core/Core/Sources/Network/Common/TokenRequestIntercepter.swift +++ b/Projects/Core/Core/Sources/Network/Common/TokenRequestIntercepter.swift @@ -86,12 +86,6 @@ public final class TokenRequestIntercepter: RequestInterceptor { } catch { localStorage.removeAll() completion(.doNotRetryWithError(error)) - - NotificationCenter.default.post( - name: Notification.Name("appRestart"), - object: self, - userInfo: ["message": "로그인이 필요합니다."] - ) } } }