We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1258ce0 commit 9744ca6Copy full SHA for 9744ca6
app/src/main/kotlin/com/neko/v2ray/ui/MainRecyclerAdapter.kt
@@ -84,9 +84,12 @@ class MainRecyclerAdapter(val activity: MainActivity) : RecyclerView.Adapter<Mai
84
}
85
86
87
- // 替换服务器地址的'.'之后的内容为'***',例如将'1.23.45.67'替换为'1.23.45.***'
88
- val modifiedServer = profile.server?.split('.')?.dropLast(1)?.joinToString(".", postfix = ".***")
89
- val strState = "$modifiedServer : ${profile.serverPort}"
+ // 隐藏主页服务器地址为xxx:xxx:***/xxx.xxx.xxx.***
+ val strState = "${profile.server?.let {
+ if (it.contains(":"))
90
+ it.split(":").take(2).joinToString(":") + ":***"
91
+ else
92
+ it.split('.').dropLast(1).joinToString(".", postfix = ".***") }} : ${profile.serverPort}"
93
94
holder.itemMainBinding.tvStatistics.text = strState
95
0 commit comments