summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2023-07-05 21:49:42 +0200
committerMikael Magnusson <mikma@users.sourceforge.net>2023-07-05 21:49:42 +0200
commit9d82a08950c3c1504024e4faf7026e482e46f071 (patch)
tree1d98826f6363683a75abc7b3e50a28acc7449d0e
parent4da3b2d563e6046ad9d6b2ac690501ed4b121ab3 (diff)
WIP: Fix Condition 'it.getPacFileUrl() != null' is always 'true'
-rw-r--r--ui/src/main/java/com/wireguard/android/viewmodel/InterfaceProxy.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/src/main/java/com/wireguard/android/viewmodel/InterfaceProxy.kt b/ui/src/main/java/com/wireguard/android/viewmodel/InterfaceProxy.kt
index 16c3e6a3..81a548f9 100644
--- a/ui/src/main/java/com/wireguard/android/viewmodel/InterfaceProxy.kt
+++ b/ui/src/main/java/com/wireguard/android/viewmodel/InterfaceProxy.kt
@@ -140,7 +140,7 @@ class InterfaceProxy : BaseObservable, Parcelable {
httpProxyHostname = other.httpProxy.map { if (it.getHost().startsWith('[') && it.getHost().endsWith(']')) it.getHost().substring(1, it.getHost().length-1) else it.getHost() }.orElse("")
httpProxyPort = other.httpProxy.map { if (it.getPort() <= 0) "8080" else it.getPort().toString() }.orElse("")
httpProxyPac = other.httpProxy.map { it.getPacFileUrl().toString() }.orElse("")
- httpProxyMenu = other.httpProxy.map { if (it.getPacFileUrl() != null && it.getPacFileUrl() != Uri.EMPTY) Constants.HTTP_PROXY_PAC else if (it.getHost() != "") Constants.HTTP_PROXY_MANUAL else Constants.HTTP_PROXY_NONE }.orElse(Constants.HTTP_PROXY_NONE)
+ httpProxyMenu = other.httpProxy.map { if (it.getPacFileUrl() != Uri.EMPTY) Constants.HTTP_PROXY_PAC else if (it.getHost() != "") Constants.HTTP_PROXY_MANUAL else Constants.HTTP_PROXY_NONE }.orElse(Constants.HTTP_PROXY_NONE)
val keyPair = other.keyPair
privateKey = keyPair.privateKey.toBase64()
}