mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-26 05:58:09 +00:00
Correctly count message events for notification heuristic.
This commit is contained in:
committed by
Greyson Parrelli
parent
5b7eb9c332
commit
e4b755ced8
@@ -176,7 +176,7 @@ object SlowNotificationHeuristics {
|
||||
Log.d(TAG, "insufficient data for message latency")
|
||||
return false
|
||||
}
|
||||
val eventCount = metrics.count { it.name == SignalLocalMetrics.MessageLatency.NAME_HIGH }
|
||||
val eventCount = metrics.find { it.name == SignalLocalMetrics.MessageLatency.NAME_HIGH }?.count ?: 0
|
||||
if (eventCount < messageThreshold) {
|
||||
Log.d(TAG, "not enough messages for message latency")
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user