Skip to content

Commit

Permalink
feat: update ServiceStatus.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajhilje committed Oct 11, 2023
1 parent 9c496cc commit d44f933
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion IVPNClient/Models/ServiceStatus.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

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

Expand Down

0 comments on commit d44f933

Please sign in to comment.