From 05ee01c7d41988be60eb3975241939343bc177ec Mon Sep 17 00:00:00 2001
From: level <1364007522@qq.com>
Date: Thu, 11 Dec 2025 12:12:02 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E9=94=AE=E8=BF=9E=201.=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E8=8A=82=E7=82=B9=E8=8E=B7=E5=8F=96=E5=A4=B1=E8=B4=A5?=
=?UTF-8?q?=E5=90=8E=E5=9C=A8=E6=AC=A1=E8=8E=B7=E5=8F=96=E8=8A=82=E7=82=B9?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9A=84=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../clash/fragment/home/HomeFragment.kt | 54 +++++++++++--------
app/src/main/res/values-en/strings.xml | 1 +
app/src/main/res/values-zh-rHK/strings.xml | 1 +
app/src/main/res/values-zh-rTW/strings.xml | 1 +
app/src/main/res/values/strings.xml | 1 +
5 files changed, 37 insertions(+), 21 deletions(-)
diff --git a/app/src/main/java/com/yingmao/clash/fragment/home/HomeFragment.kt b/app/src/main/java/com/yingmao/clash/fragment/home/HomeFragment.kt
index c3cf293..83b2cb7 100644
--- a/app/src/main/java/com/yingmao/clash/fragment/home/HomeFragment.kt
+++ b/app/src/main/java/com/yingmao/clash/fragment/home/HomeFragment.kt
@@ -375,29 +375,36 @@ open class HomeFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispa
}
private fun startClash(isStart: Boolean) {
- launch {
- profileBinder?.let { pm ->
- val active = pm.queryActive()
- if (active == null) {
- if (isStart) {
- delay(2000)
- }
- Log.d("startClash: 未选择")
- val pro = pm.queryAll().find {
- it.name == Conf.getClashConfName(this@HomeFragment.context)
- }
+ val nodeJson=serStore.nodes
+ Log.d("nodeJson: ${nodeJson.isEmpty()}")
+ if(nodeJson.isEmpty()){
+ RxToast.info(resources.getString(R.string.GetNodesAgined))
+ refreshNode()
+ hideLoading()
+ }else{
+ launch {
+ profileBinder?.let { pm ->
+ val active = pm.queryActive()
+ if (active == null) {
+ if (isStart) {
+ delay(2000)
+ }
+ Log.d("startClash: 未选择")
+ val pro = pm.queryAll().find {
+ it.name == Conf.getClashConfName(this@HomeFragment.context)
+ }
- pro?.let { profile ->
- Log.d("new setactive name " + profile.name)
- pm.setActive(profile)
-
- newUuid = profile.uuid.toString()
- isSubbed = true
- } ?: run {
- //为空的情况下选择第一个
- pm.queryAll().forEach { profile ->
+ pro?.let { profile ->
+ Log.d("new setactive name " + profile.name)
pm.setActive(profile)
+ newUuid = profile.uuid.toString()
+ isSubbed = true
+ } ?: run {
+ //为空的情况下选择第一个
+ pm.queryAll().forEach { profile ->
+ pm.setActive(profile)
+
newUuid = profile.uuid.toString()
isSubbed = true
return@forEach
@@ -431,11 +438,13 @@ open class HomeFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispa
ivAccelerate.setImageResource(R.mipmap.yjl_home_clink_select_bg)
hideLoading()
// checkGlo()
- }
+ }
+ }
}
}
+
}
private val nextRequestKey = AtomicInteger(0)
@@ -748,6 +757,9 @@ open class HomeFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispa
cm.patchSelector("GLOBAL", baseNodeName)
}
}
+ }else{
+ RxToast.info(resources.getString(R.string.GetNodesAgined))
+ refreshNode()
}
}
} else {
diff --git a/app/src/main/res/values-en/strings.xml b/app/src/main/res/values-en/strings.xml
index cbd6834..52a26d8 100644
--- a/app/src/main/res/values-en/strings.xml
+++ b/app/src/main/res/values-en/strings.xml
@@ -424,4 +424,5 @@ In order to implement and strengthen awareness of personal information security
Please disconnect and switch modes
Please enable acceleration before switching to global mode
Switching nodes is not currently supported in global acceleration mode. Please switch to smart mode!
+ Getting nodes, please click to speed up later
\ No newline at end of file
diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml
index 4a2508f..b8f7711 100644
--- a/app/src/main/res/values-zh-rHK/strings.xml
+++ b/app/src/main/res/values-zh-rHK/strings.xml
@@ -416,4 +416,5 @@
請斷開連線後在進行模式切換
請開啟加速後在進行全域模式切換
全域模式加速下暫不支援切換節點,請切換至智慧模式!
+ 取得節點中,請稍後點選加速
\ No newline at end of file
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index e55b83a..3e33c43 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -414,4 +414,5 @@
請斷開連線後在進行模式切換
請開啟加速後在進行全域模式切換
全域模式加速下暫不支援切換節點,請切換至智慧模式!
+ 取得節點中,請稍後點選加速
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index cec9aab..9698bf0 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -481,4 +481,5 @@
点击分享
请开启加速后在进行全局模式切换
全局模式加速下暂不支持切换节点,请切换至智能模式!
+ 获取节点中,请稍后点击加速
\ No newline at end of file