Skip to content

Commit

Permalink
Merge pull request #347 from ivpn/bugfix/servers-latency-not-calculat…
Browse files Browse the repository at this point in the history
…ed-after-login

Servers latency not calculated after logging in
  • Loading branch information
jurajhilje authored May 17, 2023
2 parents 2bcfcd3 + d9e4780 commit 25f8c07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 2 additions & 2 deletions IVPNClient/Scenes/MainScreen/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ class MainViewController: UIViewController {

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
startPingService(updateServerListDidComplete: updateServerListDidComplete)
refreshUI()
initConnectionInfo()
startPingService()
}

deinit {
Expand Down Expand Up @@ -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()
Expand Down
5 changes: 0 additions & 5 deletions IVPNClient/Scenes/Signup/LoginViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 25f8c07

Please sign in to comment.