Simplify and document some functions

This commit is contained in:
bemusementpark
2024-08-03 22:49:23 +09:30
parent 2125502e77
commit 61cb602e63
2 changed files with 12 additions and 28 deletions

View File

@@ -736,10 +736,7 @@ object SnodeAPI {
else json?.let(::parseSnodes)
?.takeIf { it.isNotEmpty() }
?.let { database.setSwarm(publicKey, it.toSet()) }
?: run {
Log.d("Loki", "Invalidating swarm for: $publicKey.")
dropSnodeFromSwarmIfNeeded(snode, publicKey)
}
?: dropSnodeFromSwarmIfNeeded(snode, publicKey).also { Log.d("Loki", "Invalidating swarm for: $publicKey.") }
}
404 -> {
Log.d("Loki", "404, probably no file found")