Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
0d485059
Commit
0d485059
authored
Feb 02, 2020
by
jiahua.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Troop Member List
parent
7de51f99
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
14 deletions
+20
-14
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/ContactImpl.kt
...ommonMain/kotlin/net/mamoe/mirai/qqandroid/ContactImpl.kt
+18
-12
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Group.kt
...re/src/commonMain/kotlin/net.mamoe.mirai/contact/Group.kt
+2
-2
No files found.
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/ContactImpl.kt
View file @
0d485059
...
...
@@ -73,25 +73,30 @@ internal class MemberImpl(
@UseExperimental
(
MiraiInternalAPI
::
class
)
internal
class
GroupImpl
(
bot
:
QQAndroidBot
,
override
val
coroutineContext
:
CoroutineContext
,
override
val
id
:
Long
)
:
ContactImpl
(),
Group
{
internal
class
GroupImpl
(
bot
:
QQAndroidBot
,
override
val
coroutineContext
:
CoroutineContext
,
override
val
id
:
Long
,
override
val
owner
:
Member
,
override
val
name
:
String
,
override
val
announcement
:
String
,
override
val
members
:
ContactList
<
Member
>
)
:
ContactImpl
(),
Group
{
override
val
internalId
:
GroupInternalId
=
GroupId
(
id
).
toInternalId
()
override
val
owner
:
Member
get
()
=
TODO
(
"not implemented"
)
override
val
name
:
String
get
()
=
TODO
(
"not implemented"
)
override
val
announcement
:
String
get
()
=
TODO
(
"not implemented"
)
override
val
members
:
ContactList
<
Member
>
=
ContactList
(
LockFreeLinkedList
())
override
fun
getMember
(
id
:
Long
):
Member
=
members
.
delegate
.
filteringGetOrAdd
({
it
.
id
==
id
},
{
MemberImpl
(
bot
.
getQQ
(
id
)
as
QQImpl
,
this
,
coroutineContext
)
})
members
.
delegate
.
filteringGetOrAdd
(
{
it
.
id
==
id
},
{
MemberImpl
(
bot
.
getQQ
(
id
)
as
QQImpl
,
this
,
coroutineContext
)
})
override
suspend
fun
updateGroupInfo
():
GroupInfo
{
TODO
(
"not implemented"
)
override
suspend
fun
updateGroupInfo
():
net
.
mamoe
.
mirai
.
data
.
GroupInfo
{
TODO
(
"not implemented"
)
//To change body of created functions use File | Settings | File Templates.
}
override
suspend
fun
quit
():
Boolean
{
TODO
(
"not implemented"
)
TODO
(
"not implemented"
)
//To change body of created functions use File | Settings | File Templates.
}
operator
fun
get
(
key
:
Long
):
Member
?
{
TODO
(
"not implemented"
)
//To change body of created functions use File | Settings | File Templates.
}
override
val
bot
:
QQAndroidBot
by
bot
.
unsafeWeakRef
()
...
...
@@ -112,4 +117,5 @@ internal class GroupImpl(bot: QQAndroidBot, override val coroutineContext: Corou
override
suspend
fun
uploadImage
(
image
:
ExternalImage
):
ImageId
{
TODO
(
"not implemented"
)
}
}
\ No newline at end of file
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Group.kt
View file @
0d485059
...
...
@@ -15,7 +15,7 @@ import net.mamoe.mirai.utils.coerceAtLeastOrFail
* - Group ID([Group.internalId]) 是与调用 API 时使用的 id.(在 QQ 客户端中不可见)
* @author Him188moe
*/
interface
Group
:
Contact
,
CoroutineScope
/*, Map<UInt, Member>*/
{
// TODO: 2020/1/29 实现接口 Map<Long, Memebr>
interface
Group
:
Contact
,
CoroutineScope
{
/**
* 内部 ID. 内部 ID 为 [GroupId] 的映射
*/
...
...
@@ -101,4 +101,4 @@ fun Long.groupId(): GroupId = GroupId(this.coerceAtLeastOrFail(0))
* @see GroupInternalId.toId 由 [GroupInternalId] 转换为 [GroupId]
* @see GroupId.toInternalId 由 [GroupId] 转换为 [GroupInternalId]
*/
inline
class
GroupInternalId
(
inline
val
value
:
Long
)
inline
class
GroupInternalId
(
inline
val
value
:
Long
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment