fix: prevent very old messages (15 minutes ago) being processed to prevent endless crashes in some cases

This commit is contained in:
0x330a
2023-01-23 15:43:43 +11:00
parent cdd2559839
commit 86b065203f
2 changed files with 16 additions and 0 deletions

View File

@@ -56,6 +56,10 @@ object SnodeAPI {
* user's clock is incorrect.
*/
internal var clockOffset = 0L
val nowWithOffset
get() = System.currentTimeMillis() + clockOffset
internal var forkInfo by observable(database.getForkInfo()) { _, oldValue, newValue ->
if (newValue > oldValue) {
Log.d("Loki", "Setting new fork info new: $newValue, old: $oldValue")