Remove unused QQAndroidBot.selfInfo

This commit is contained in:
Him188 2021-02-06 20:42:59 +08:00
parent 9211f697cf
commit 6cb3aed2f0
2 changed files with 0 additions and 16 deletions

View File

@ -80,14 +80,6 @@ internal class QQAndroidBot constructor(
override lateinit var nick: String
internal var selfInfo: JceFriendInfo? = null
get() = field ?: error("selfInfo is not yet initialized")
set(it) {
checkNotNull(it)
field = it
nick = it.nick
}
override val asFriend: Friend by lazy {
@OptIn(LowLevelApi::class)
Mirai.newFriend(this, FriendInfoImpl(uin, nick, ""))

View File

@ -32,7 +32,6 @@ import net.mamoe.mirai.utils.retryCatching
import net.mamoe.mirai.utils.verbose
internal interface ContactCache {
}
internal interface ContactUpdater {
@ -92,13 +91,6 @@ internal class ContactUpdaterImpl(
bot.client, currentFriendCount, 150, 0, 0
).sendAndExpect<FriendList.GetFriendGroupList.Response>(timeoutMillis = 5000, retry = 2)
// self info
data.selfInfo?.run {
bot.selfInfo = this
// bot.remark = remark ?: ""
// bot.sex = sex
}
totalFriendCount = data.totalFriendCount
data.friendList.forEach {
// atomic