From 3dc28a1c5151f54dce13c78005539e9be7bc38a8 Mon Sep 17 00:00:00 2001 From: Nuo Xu Date: Mon, 23 Dec 2024 12:23:42 -0500 Subject: [PATCH 1/2] display country name for Singapore server selection --- ios/brave-ios/Sources/BraveVPN/BraveVPN.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ios/brave-ios/Sources/BraveVPN/BraveVPN.swift b/ios/brave-ios/Sources/BraveVPN/BraveVPN.swift index da3b3cdc6fad..da4b3d612006 100644 --- a/ios/brave-ios/Sources/BraveVPN/BraveVPN.swift +++ b/ios/brave-ios/Sources/BraveVPN/BraveVPN.swift @@ -217,6 +217,12 @@ public class BraveVPN { return ( city.trimmingCharacters(in: .whitespaces), country.trimmingCharacters(in: .whitespaces) ) + } else if locationComponents.count == 1 { + // e.g Singapore + let country = locationComponents[safe: 0] ?? "" + return ( + nil, country.trimmingCharacters(in: .whitespaces) + ) } else { return (nil, nil) } From 612b2bb79fca7ad152cc3df30f3f370dd894fbd6 Mon Sep 17 00:00:00 2001 From: Nuo Xu Date: Mon, 23 Dec 2024 12:30:02 -0500 Subject: [PATCH 2/2] adjust comment --- ios/brave-ios/Sources/BraveVPN/BraveVPN.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/brave-ios/Sources/BraveVPN/BraveVPN.swift b/ios/brave-ios/Sources/BraveVPN/BraveVPN.swift index da4b3d612006..8ac5eed34cd9 100644 --- a/ios/brave-ios/Sources/BraveVPN/BraveVPN.swift +++ b/ios/brave-ios/Sources/BraveVPN/BraveVPN.swift @@ -218,7 +218,7 @@ public class BraveVPN { city.trimmingCharacters(in: .whitespaces), country.trimmingCharacters(in: .whitespaces) ) } else if locationComponents.count == 1 { - // e.g Singapore + // e.g. Singapore let country = locationComponents[safe: 0] ?? "" return ( nil, country.trimmingCharacters(in: .whitespaces)