Misc refinements

This commit is contained in:
Mygod
2018-01-21 00:22:52 -08:00
parent abe8802535
commit b91cb126a9
2 changed files with 2 additions and 4 deletions

View File

@@ -79,8 +79,8 @@ class RepeaterFragment : Fragment(), ServiceConnection, Toolbar.OnMenuItemClickL
val ip = neighbour?.ip
val icon get() = TetherType.ofInterface(iface, p2pInterface).icon
val title: CharSequence get() = listOf(ip, mac).filter { !it.isNullOrEmpty() }.joinToString(", ")
val description: CharSequence get() = when (neighbour?.state) {
val title get() = listOf(ip, mac).filter { !it.isNullOrEmpty() }.joinToString(", ")
val description get() = when (neighbour?.state) {
IpNeighbour.State.INCOMPLETE, null -> "Connecting to $iface"
IpNeighbour.State.VALID -> "Connected to $iface"
IpNeighbour.State.VALID_DELAY -> "Connected to $iface (losing)"