Skip to content

Commit d166b03

Browse files
authored
Update ServerActivity.kt (#4326)
1 parent ddf5f22 commit d166b03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

V2rayNG/app/src/main/java/com/v2ray/ang/ui/ServerActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,11 +356,11 @@ class ServerActivity : BaseActivity() {
356356
et_sni?.text = Utils.getEditable(config.sni)
357357
config.fingerPrint?.let {
358358
val utlsIndex = Utils.arrayFind(uTlsItems, it)
359-
sp_stream_fingerprint?.setSelection(utlsIndex)
359+
utlsIndex.let { sp_stream_fingerprint?.setSelection(if (it >= 0) it else 0) }
360360
}
361361
config.alpn?.let {
362362
val alpnIndex = Utils.arrayFind(alpns, it)
363-
sp_stream_alpn?.setSelection(alpnIndex)
363+
alpnIndex.let { sp_stream_alpn?.setSelection(if (it >= 0) it else 0) }
364364
}
365365
if (config.security == TLS) {
366366
container_allow_insecure?.visibility = View.VISIBLE

0 commit comments

Comments
 (0)