Skip to content

Commit dbc9056

Browse files
committed
fix: 修复编译警告
1 parent 2eb8397 commit dbc9056

5 files changed

Lines changed: 5 additions & 9 deletions

File tree

app/src/main/java/com/muort/upworker/feature/zerotrust/gateway/GatewayListAdapter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class GatewayListAdapter(
3838
"DOMAIN" -> "域名"
3939
"IP" -> "IP 地址"
4040
"URL" -> "URL"
41-
else -> list.type ?: "未知"
41+
else -> list.type
4242
}
4343
binding.listDescriptionText.text = list.description ?: "无描述"
4444
binding.itemCountText.text = "项目数: ${list.count ?: 0}"

app/src/main/java/com/muort/upworker/feature/zerotrust/gateway/GatewayListsFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class GatewayListsFragment : Fragment() {
8686
}
8787

8888
launch {
89-
viewModel.loadingState.collect { isLoading ->
89+
viewModel.loadingState.collect { _ ->
9090
// Loading state handled by ViewModel
9191
}
9292
}

app/src/main/java/com/muort/upworker/feature/zerotrust/gateway/GatewayLocationsFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class GatewayLocationsFragment : Fragment() {
8585
}
8686

8787
launch {
88-
viewModel.loadingState.collect { isLoading ->
88+
viewModel.loadingState.collect { _ ->
8989
// Loading state handled by ViewModel
9090
}
9191
}

app/src/main/java/com/muort/upworker/feature/zerotrust/gateway/GatewayRuleAdapter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class GatewayRuleAdapter(
5151

5252
// Set switch without triggering listener
5353
binding.enabledSwitch.setOnCheckedChangeListener(null)
54-
binding.enabledSwitch.isChecked = rule.enabled ?: true
54+
binding.enabledSwitch.isChecked = rule.enabled
5555
binding.enabledSwitch.setOnCheckedChangeListener { _, isChecked ->
5656
onEnabledChange(rule, isChecked)
5757
}

app/src/main/java/com/muort/upworker/feature/zerotrust/gateway/GatewayRulesFragment.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class GatewayRulesFragment : Fragment() {
8888
}
8989

9090
launch {
91-
viewModel.loadingState.collect { isLoading ->
91+
viewModel.loadingState.collect { _ ->
9292
// Loading state handled byViewModel
9393
}
9494
}
@@ -131,10 +131,6 @@ class GatewayRulesFragment : Fragment() {
131131
val dnsFields = dialogView.findViewById<View>(R.id.dnsFields)
132132
val httpFields = dialogView.findViewById<View>(R.id.httpFields)
133133
val l4Fields = dialogView.findViewById<View>(R.id.l4Fields)
134-
135-
val dnsHostInput = dialogView.findViewById<TextInputEditText>(R.id.dnsHostInput)
136-
val httpHostInput = dialogView.findViewById<TextInputEditText>(R.id.httpHostInput)
137-
val l4SourceIpInput = dialogView.findViewById<TextInputEditText>(R.id.l4SourceIpInput)
138134

139135
// Setup type spinner
140136
val types = listOf("dns" to "DNS", "http" to "HTTP", "l4" to "网络 (L4)")

0 commit comments

Comments
 (0)