From d44f933eec95d28030a17f1f62e0c885e070e03f Mon Sep 17 00:00:00 2001 From: Juraj Hilje Date: Wed, 11 Oct 2023 16:23:27 +0200 Subject: [PATCH] feat: update ServiceStatus.swift --- IVPNClient/Models/ServiceStatus.swift | 2 +- IVPNClient/Scenes/Signup/LoginViewController.swift | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/IVPNClient/Models/ServiceStatus.swift b/IVPNClient/Models/ServiceStatus.swift index 9da217960..6d78209cf 100644 --- a/IVPNClient/Models/ServiceStatus.swift +++ b/IVPNClient/Models/ServiceStatus.swift @@ -116,7 +116,7 @@ struct ServiceStatus: Codable { func isLegacyAccount() -> Bool { let accountId = KeyChain.username ?? "" - if accountId.hasPrefix("ivpn") && currentPlan.hasPrefix("IVPN Pro") && currentPlan != "IVPN Pro" { + if accountId.hasPrefix("ivpn") && currentPlan.contains("VPN Pro") && currentPlan != "IVPN Pro" { return true } diff --git a/IVPNClient/Scenes/Signup/LoginViewController.swift b/IVPNClient/Scenes/Signup/LoginViewController.swift index 36042b089..14a3b5eac 100644 --- a/IVPNClient/Scenes/Signup/LoginViewController.swift +++ b/IVPNClient/Scenes/Signup/LoginViewController.swift @@ -279,6 +279,9 @@ extension LoginViewController { KeyChain.username = (self.userName.text ?? "").trim() guard !Application.shared.serviceStatus.isLegacyAccount() else { + navigationController?.dismiss(animated: true, completion: { + NotificationCenter.default.post(name: Notification.Name.UpdateFloatingPanelLayout, object: nil) + }) return }