Refine code style

This commit is contained in:
Mygod
2021-11-26 22:56:38 -05:00
parent bd65be29ea
commit de3226e27a
11 changed files with 46 additions and 45 deletions

View File

@@ -42,10 +42,10 @@ open class Client(val mac: MacAddressCompat, val iface: String) {
* we hijack the get title process to check if we need to perform MacLookup,
* as record might not be initialized in other more appropriate places
*/
SpannableStringBuilder(if (record.nickname.isEmpty()) {
SpannableStringBuilder(record.nickname.ifEmpty {
if (record.macLookupPending) MacLookup.perform(mac)
macIface
} else record.nickname).apply {
}).apply {
if (record.blocked) setSpan(StrikethroughSpan(), 0, length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
}
}