From d9e4780341b8306cf02b990650c134a94286fbd4 Mon Sep 17 00:00:00 2001 From: Juraj Hilje Date: Wed, 17 May 2023 12:45:59 +0200 Subject: [PATCH] fix(ping service): update SessionManagerDelegate in LoginViewController --- IVPNClient/Scenes/MainScreen/MainViewController.swift | 4 ++-- IVPNClient/Scenes/Signup/LoginViewController.swift | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/IVPNClient/Scenes/MainScreen/MainViewController.swift b/IVPNClient/Scenes/MainScreen/MainViewController.swift index 71f2018cb..0539f5e6b 100644 --- a/IVPNClient/Scenes/MainScreen/MainViewController.swift +++ b/IVPNClient/Scenes/MainScreen/MainViewController.swift @@ -79,9 +79,9 @@ class MainViewController: UIViewController { override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) - startPingService(updateServerListDidComplete: updateServerListDidComplete) refreshUI() initConnectionInfo() + startPingService() } deinit { @@ -244,7 +244,7 @@ class MainViewController: UIViewController { Timer.scheduledTimer(timeInterval: 60 * 15, target: self, selector: #selector(updateServersList), userInfo: nil, repeats: true) } - private func startPingService(updateServerListDidComplete: Bool) { + private func startPingService() { if updateServerListDidComplete { DispatchQueue.delay(0.5) { Pinger.shared.ping() diff --git a/IVPNClient/Scenes/Signup/LoginViewController.swift b/IVPNClient/Scenes/Signup/LoginViewController.swift index 2859e1970..df235143e 100644 --- a/IVPNClient/Scenes/Signup/LoginViewController.swift +++ b/IVPNClient/Scenes/Signup/LoginViewController.swift @@ -263,13 +263,8 @@ extension LoginViewController { hud.dismiss() loginProcessStarted = false loginConfirmation.clear() - KeyChain.username = (self.userName.text ?? "").trim() - Application.shared.serverList = VPNServerList() - Application.shared.settings = Settings(serverList: Application.shared.serverList) - WidgetCenter.shared.reloadTimelines(ofKind: "IVPNWidget") - navigationController?.dismiss(animated: true, completion: { NotificationCenter.default.post(name: Notification.Name.ServiceAuthorized, object: nil) NotificationCenter.default.post(name: Notification.Name.UpdateFloatingPanelLayout, object: nil)