From 8f08d090c500918729cdf7b0437f341184f266b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Wed, 24 Feb 2021 12:47:37 +0800 Subject: [PATCH] Fix parse --- .../src/main/java/tw/nekomimi/nekogram/utils/ProxyUtil.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/utils/ProxyUtil.kt b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/utils/ProxyUtil.kt index 874a1b7fe..02cc64154 100644 --- a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/utils/ProxyUtil.kt +++ b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/utils/ProxyUtil.kt @@ -76,9 +76,11 @@ object ProxyUtil { @JvmOverloads fun parseProxies(text: String, tryDecode: Boolean = true): MutableList { - try { - return parseProxies(String(Base64.decode(text, Base64.NO_PADDING)), false) - } catch (ignored: Exception) { + if (tryDecode) { + try { + return parseProxies(String(Base64.decode(text, Base64.NO_PADDING)), false) + } catch (ignored: Exception) { + } } val proxies = mutableListOf()