Browse Source

Fix share custom config server

世界 3 years ago
parent
commit
1a29de42fb
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/src/main/java/io/nekohasekai/sagernet/database/ProxyEntity.kt

+ 3 - 3
app/src/main/java/io/nekohasekai/sagernet/database/ProxyEntity.kt

@@ -172,7 +172,7 @@ data class ProxyEntity(
         output.writeString(error)
 
         val data = KryoConverters.serialize(requireBean())
-        output.writeVarInt(data.size,true)
+        output.writeVarInt(data.size, true)
         output.writeBytes(data)
 
         output.writeBoolean(dirty)
@@ -275,7 +275,6 @@ data class ProxyEntity(
     fun haveLink(): Boolean {
         return when (type) {
             TYPE_CHAIN -> false
-            TYPE_CONFIG -> false
             TYPE_BALANCER -> false
             else -> true
         }
@@ -284,6 +283,7 @@ data class ProxyEntity(
     fun haveStandardLink(): Boolean {
         return haveLink() && when (type) {
             TYPE_RELAY_BATON, TYPE_BROOK, TYPE_SSH, TYPE_WG, TYPE_HYSTERIA -> false
+            TYPE_CONFIG -> false
             else -> true
         }
     }
@@ -367,7 +367,7 @@ data class ProxyEntity(
     }
 
     fun needUoT(): Boolean {
-        return when(type) {
+        return when (type) {
             TYPE_NAIVE -> naiveBean!!.uot
             else -> false
         }