♻️ Kotlinize expression
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / freenet / wot / IdentityLoader.kt
index 3fa87ba..b40484e 100644 (file)
@@ -49,7 +49,7 @@ class IdentityLoader @Inject constructor(private val webOfTrustConnector: WebOfT
                        }
 
        private fun OwnIdentity.doesNotHaveCorrectContext() =
-                       context != null && !hasContext(context.context)
+                       context?.let { it.context !in contexts } ?: false
 
        private fun <R> time(logMessage: (Stopwatch, Collection<R>) -> String, loader: () -> Collection<R>): Collection<R> =
                        Stopwatch.createStarted().let { stopwatch ->