Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
fix(MainRecyclerAdapter.kt): 将原有的主界面中服务器IP隐藏的逻辑中的1.23.45.67替换为1.23.45…
Browse files Browse the repository at this point in the history
…***更新为1.23.45.*** (#3585)

Co-authored-by: xubeiyan <yuyeyongdong@gmail.com>
  • Loading branch information
2 people authored and AnGgIt86 committed Sep 26, 2024
1 parent 5fef5a3 commit e24dd3b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/main/kotlin/com/neko/v2ray/ui/MainRecyclerAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ class MainRecyclerAdapter(val activity: MainActivity) : RecyclerView.Adapter<Mai
}
}

val strState = "${profile.server?.dropLast(3)}*** : ${profile.serverPort}"
// 替换服务器地址的'.'之后的内容为'***',例如将'1.23.45.67'替换为'1.23.45.***'
val modifiedServer = profile.server?.split('.')?.dropLast(1)?.joinToString(".", postfix = ".***")
val strState = "$modifiedServer : ${profile.serverPort}"

holder.itemMainBinding.tvStatistics.text = strState

Expand Down

0 comments on commit e24dd3b

Please sign in to comment.