Refine code style again
This commit is contained in:
@@ -151,8 +151,7 @@ formatting:
|
|||||||
android: true
|
android: true
|
||||||
autoCorrect: true
|
autoCorrect: true
|
||||||
AnnotationOnSeparateLine:
|
AnnotationOnSeparateLine:
|
||||||
active: true
|
active: false
|
||||||
autoCorrect: true
|
|
||||||
ChainWrapping:
|
ChainWrapping:
|
||||||
active: true
|
active: true
|
||||||
autoCorrect: true
|
autoCorrect: true
|
||||||
@@ -172,10 +171,7 @@ formatting:
|
|||||||
autoCorrect: true
|
autoCorrect: true
|
||||||
layout: 'idea'
|
layout: 'idea'
|
||||||
Indentation:
|
Indentation:
|
||||||
active: true
|
active: false
|
||||||
autoCorrect: true
|
|
||||||
indentSize: 4
|
|
||||||
continuationIndentSize: 4
|
|
||||||
MaximumLineLength:
|
MaximumLineLength:
|
||||||
active: false
|
active: false
|
||||||
ModifierOrdering:
|
ModifierOrdering:
|
||||||
|
|||||||
@@ -105,9 +105,10 @@ class ClientsFragment : Fragment() {
|
|||||||
receive = -1
|
receive = -1
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun toString() = if (send < 0 || receive < 0) "" else
|
override fun toString() = if (send < 0 || receive < 0) "" else {
|
||||||
"▲ ${Formatter.formatFileSize(app, send)}/s\t\t▼ ${Formatter.formatFileSize(app, receive)}/s"
|
"▲ ${Formatter.formatFileSize(app, send)}/s\t\t▼ ${Formatter.formatFileSize(app, receive)}/s"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private inner class ClientViewHolder(parent: ViewGroup, val binding: ListitemClientBinding =
|
private inner class ClientViewHolder(parent: ViewGroup, val binding: ListitemClientBinding =
|
||||||
ListitemClientBinding.inflate(LayoutInflater.from(parent.context), parent, false)) :
|
ListitemClientBinding.inflate(LayoutInflater.from(parent.context), parent, false)) :
|
||||||
|
|||||||
@@ -162,8 +162,9 @@ class Routing(private val caller: Any, private val downstream: String) : IpNeigh
|
|||||||
MasqueradeMode.None -> { } // nothing to be done here
|
MasqueradeMode.None -> { } // nothing to be done here
|
||||||
MasqueradeMode.Simple -> {
|
MasqueradeMode.Simple -> {
|
||||||
// note: specifying -i wouldn't work for POSTROUTING
|
// note: specifying -i wouldn't work for POSTROUTING
|
||||||
iptablesAdd(if (upstream == null) "vpnhotspot_masquerade -s $hostSubnet -j MASQUERADE" else
|
iptablesAdd(if (upstream == null) {
|
||||||
"vpnhotspot_masquerade -s $hostSubnet -o $upstream -j MASQUERADE", "nat")
|
"vpnhotspot_masquerade -s $hostSubnet -j MASQUERADE"
|
||||||
|
} else "vpnhotspot_masquerade -s $hostSubnet -o $upstream -j MASQUERADE", "nat")
|
||||||
}
|
}
|
||||||
MasqueradeMode.Netd -> {
|
MasqueradeMode.Netd -> {
|
||||||
check(upstream != null) // fallback is only needed for repeater on API 23 < 28
|
check(upstream != null) // fallback is only needed for repeater on API 23 < 28
|
||||||
|
|||||||
Reference in New Issue
Block a user