Fix active peer notification in background logic

This commit is contained in:
callebtc
2026-01-18 02:20:59 +07:00
parent ab04764212
commit 6eb7d79ed0
2 changed files with 13 additions and 0 deletions
@@ -174,6 +174,11 @@ class NotificationManager(
}
fun showActiveUserNotification(peers: List<String>) {
if (peers.isEmpty()) {
notificationIntervalManager.recentlySeenPeers.clear()
return
}
val currentTime = System.currentTimeMillis()
val activePeerNotificationIntervalExceeded =
(currentTime - notificationIntervalManager.lastNetworkNotificationTime) > ACTIVE_PEERS_NOTIFICATION_TIME_INTERVAL