mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-23 22:30:47 +08:00
Make Group not extends Iterable<Member>
This commit is contained in:
parent
a2e7bba03b
commit
fc5c73eafd
@ -5,6 +5,7 @@ package net.mamoe.mirai.contact
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import net.mamoe.mirai.network.protocol.tim.packet.action.GroupInfo
|
||||
import net.mamoe.mirai.network.protocol.tim.packet.action.QuitGroupResponse
|
||||
import net.mamoe.mirai.utils.MiraiExperimentalAPI
|
||||
import net.mamoe.mirai.utils.internal.PositiveNumbers
|
||||
import net.mamoe.mirai.utils.internal.coerceAtLeastOrFail
|
||||
|
||||
@ -17,7 +18,7 @@ import net.mamoe.mirai.utils.internal.coerceAtLeastOrFail
|
||||
* - Group ID([Group.internalId]) 是与调用 API 时使用的 id.(在 QQ 客户端中不可见)
|
||||
* @author Him188moe
|
||||
*/
|
||||
interface Group : Contact, CoroutineScope, Iterable<Member>/*, Map<UInt, Member>*/ { // TODO: 2019/12/4 在 inline 稳定后实现 Map<UInt, Member>. 目前这样做会导致问题
|
||||
interface Group : Contact, CoroutineScope/*, Map<UInt, Member>*/ { // TODO: 2019/12/4 在 inline 稳定后实现 Map<UInt, Member>. 目前这样做会导致问题
|
||||
/**
|
||||
* 内部 ID. 内部 ID 为 [GroupId] 的映射
|
||||
*/
|
||||
|
@ -15,6 +15,7 @@ import net.mamoe.mirai.network.qqAccount
|
||||
import net.mamoe.mirai.network.sessionKey
|
||||
import net.mamoe.mirai.qqAccount
|
||||
import net.mamoe.mirai.sendPacket
|
||||
import net.mamoe.mirai.utils.MiraiExperimentalAPI
|
||||
import net.mamoe.mirai.utils.MiraiInternalAPI
|
||||
import net.mamoe.mirai.utils.io.logStacktrace
|
||||
import net.mamoe.mirai.withSession
|
||||
@ -85,8 +86,6 @@ internal data class GroupImpl internal constructor(override val bot: Bot, val gr
|
||||
}
|
||||
|
||||
override fun toString(): String = "Group(${this.id})"
|
||||
|
||||
override fun iterator(): Iterator<Member> = members.values.iterator()
|
||||
}
|
||||
|
||||
@Suppress("FunctionName")
|
||||
|
Loading…
Reference in New Issue
Block a user