Skip to content

Commit

Permalink
fix: 로그인 필요 얼럿 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
Siwon-L committed Oct 23, 2024
1 parent fb0b77d commit d50f571
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 31 deletions.
20 changes: 0 additions & 20 deletions Projects/App/Sources/AppCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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)
})
}
}
}
5 changes: 0 additions & 5 deletions Projects/App/Sources/NSNotification.Name+.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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": "로그인이 필요합니다."]
)
}
}
}
Expand Down

0 comments on commit d50f571

Please sign in to comment.