Also show active profile as "Disabled"

This commit is contained in:
Davide De Rosa 2022-07-04 00:30:20 +02:00
parent 15dec59692
commit e8f65e9db0
1 changed files with 1 additions and 8 deletions

View File

@ -59,16 +59,9 @@ extension PassepartoutError {
extension ObservableVPNState { extension ObservableVPNState {
func localizedStatusDescription(isActiveProfile: Bool, withErrors: Bool, dataCountIfAvailable: Bool) -> String { func localizedStatusDescription(isActiveProfile: Bool, withErrors: Bool, dataCountIfAvailable: Bool) -> String {
guard isActiveProfile && isEnabled else {
// FIXME: l10n, sure about this wording?
guard isActiveProfile else {
// return L10n.Tunnelkit.Vpn.unused
return L10n.Tunnelkit.Vpn.disabled return L10n.Tunnelkit.Vpn.disabled
} }
guard isEnabled else {
// return L10n.Tunnelkit.Vpn.disabled
return L10n.Organizer.Sections.active
}
if withErrors { if withErrors {
if let errorDescription = lastError?.localizedVPNDescription, !errorDescription.isEmpty { if let errorDescription = lastError?.localizedVPNDescription, !errorDescription.isEmpty {
return errorDescription return errorDescription