mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-17 12:08:26 +00:00
Clean
This commit is contained in:
parent
7d5114b595
commit
f3dbf98976
@ -85,7 +85,7 @@ class LokiPublicChatPoller(private val context: Context, private val group: Loki
|
||||
// region Settings
|
||||
companion object {
|
||||
private val pollForNewMessagesInterval: Long = 4 * 1000
|
||||
private val pollForDeletedMessagesInterval: Long = 20 * 1000
|
||||
private val pollForDeletedMessagesInterval: Long = 60 * 1000
|
||||
private val pollForModeratorsInterval: Long = 10 * 60 * 1000
|
||||
private val pollForDisplayNamesInterval: Long = 60 * 1000
|
||||
}
|
||||
@ -225,11 +225,6 @@ class LokiPublicChatPoller(private val context: Context, private val group: Loki
|
||||
// Kovenant propagates a context to chained promises, so LokiPublicChatAPI.sharedContext should be used for all of the below
|
||||
api.getMessages(group.channel, group.server).bind(LokiPublicChatAPI.sharedContext) { messages ->
|
||||
if (messages.isNotEmpty()) {
|
||||
if (messages.count() == 1) {
|
||||
Log.d("Loki", "Fetched 1 new message.")
|
||||
} else {
|
||||
Log.d("Loki", "Fetched ${messages.count()} new messages.")
|
||||
}
|
||||
// We need to fetch the device mapping for any devices we don't have
|
||||
uniqueDevices = messages.map { it.hexEncodedPublicKey }.toSet()
|
||||
val devicesToUpdate = uniqueDevices.filter { !userDevices.contains(it) && LokiFileServerAPI.shared.hasDeviceLinkCacheExpired(hexEncodedPublicKey = it) }
|
||||
|
Loading…
x
Reference in New Issue
Block a user