Fix android outbounds view

This commit is contained in:
problematicconsumer
2023-08-29 21:44:17 +03:30
parent 75fdffa116
commit 5a30a3a3dd
2 changed files with 7 additions and 6 deletions

View File

@@ -58,10 +58,10 @@ class GroupsChannel(private val scope: CoroutineScope) : FlutterPlugin, CommandC
} }
data class KOutboundGroup( data class KOutboundGroup(
val tag: String, @SerializedName("tag") val tag: String,
val type: String, @SerializedName("type") val type: String,
val selected: String, @SerializedName("selected") val selected: String,
val items: List<KOutboundGroupItem> @SerializedName("items") val items: List<KOutboundGroupItem>
) { ) {
companion object { companion object {
fun fromOutbound(group: OutboundGroup): KOutboundGroup { fun fromOutbound(group: OutboundGroup): KOutboundGroup {
@@ -76,8 +76,8 @@ class GroupsChannel(private val scope: CoroutineScope) : FlutterPlugin, CommandC
} }
data class KOutboundGroupItem( data class KOutboundGroupItem(
val tag: String, @SerializedName("tag") val tag: String,
val type: String, @SerializedName("type") val type: String,
@SerializedName("url-test-delay") val urlTestDelay: Int, @SerializedName("url-test-delay") val urlTestDelay: Int,
) { ) {
constructor(item: OutboundGroupItem) : this(item.tag, item.type, item.urlTestDelay) constructor(item: OutboundGroupItem) : this(item.tag, item.type, item.urlTestDelay)

View File

@@ -76,6 +76,7 @@ class MobileSingboxService with InfraLogger implements SingboxService {
if (event case String _) { if (event case String _) {
return event; return event;
} }
loggy.warning("[group client] unexpected type, msg: $event");
throw "invalid type"; throw "invalid type";
}, },
); );