@@ -130,6 +130,7 @@ object TrafficRecorder {
|
|||||||
}
|
}
|
||||||
fun update(timeout: Boolean = false) {
|
fun update(timeout: Boolean = false) {
|
||||||
synchronized(this) {
|
synchronized(this) {
|
||||||
|
unscheduleUpdateLocked()
|
||||||
if (records.isEmpty()) return
|
if (records.isEmpty()) return
|
||||||
val timestamp = System.currentTimeMillis()
|
val timestamp = System.currentTimeMillis()
|
||||||
if (!timeout && timestamp - lastUpdate <= 100) return
|
if (!timeout && timestamp - lastUpdate <= 100) return
|
||||||
@@ -141,7 +142,6 @@ object TrafficRecorder {
|
|||||||
SmartSnackbar.make(e).show()
|
SmartSnackbar.make(e).show()
|
||||||
}
|
}
|
||||||
lastUpdate = timestamp
|
lastUpdate = timestamp
|
||||||
updateJob = null
|
|
||||||
scheduleUpdateLocked()
|
scheduleUpdateLocked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user