Add client count badge
This commit is contained in:
@@ -9,10 +9,11 @@ abstract class IpNeighbourMonitoringService : Service(), IpNeighbourMonitor.Call
|
||||
|
||||
protected abstract val activeIfaces: List<String>
|
||||
|
||||
override fun onIpNeighbourAvailable(neighbours: Map<String, IpNeighbour>) {
|
||||
this.neighbours = neighbours.values.toList()
|
||||
override fun onIpNeighbourAvailable(neighbours: List<IpNeighbour>) {
|
||||
this.neighbours = neighbours
|
||||
updateNotification()
|
||||
}
|
||||
override fun postIpNeighbourAvailable() {
|
||||
protected fun updateNotification() {
|
||||
val sizeLookup = neighbours.groupBy { it.dev }.mapValues { (_, neighbours) ->
|
||||
neighbours
|
||||
.filter { it.state != IpNeighbour.State.FAILED }
|
||||
|
||||
Reference in New Issue
Block a user