Fix logic of BdhSessionSyncer.hasSession

This commit is contained in:
Karlatemp
2021-02-11 07:47:14 +08:00
parent 3e3be23397
commit 791e43819c

View File

@@ -35,7 +35,8 @@ internal class BdhSessionSyncer(
private val bot: QQAndroidBot
) {
var bdhSession: CompletableDeferred<BdhSession> = CompletableDeferred()
val hasSession: Boolean get() = bdhSession.isCompleted
val hasSession: Boolean
get() = kotlin.runCatching { bdhSession.getCompleted() }.isSuccess
fun overrideSession(
session: BdhSession,