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
3ecf7da6
Commit
3ecf7da6
authored
Dec 12, 2019
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace `===` with `==`
parent
b7ca701b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/Subscribers.kt
...rc/commonMain/kotlin/net.mamoe.mirai/event/Subscribers.kt
+2
-2
No files found.
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/Subscribers.kt
View file @
3ecf7da6
...
@@ -83,7 +83,7 @@ internal suspend fun <E : Subscribable> KClass<E>.subscribeOnce(listener: suspen
...
@@ -83,7 +83,7 @@ internal suspend fun <E : Subscribable> KClass<E>.subscribeOnce(listener: suspen
@PublishedApi
@PublishedApi
internal
suspend
fun
<
E
:
Subscribable
,
T
>
KClass
<
E
>.
subscribeUntil
(
valueIfStop
:
T
,
listener
:
suspend
(
E
)
->
T
)
=
internal
suspend
fun
<
E
:
Subscribable
,
T
>
KClass
<
E
>.
subscribeUntil
(
valueIfStop
:
T
,
listener
:
suspend
(
E
)
->
T
)
=
subscribeInternal
(
Handler
{
if
(
listener
(
it
)
==
=
valueIfStop
)
ListeningStatus
.
STOPPED
else
ListeningStatus
.
LISTENING
})
subscribeInternal
(
Handler
{
if
(
listener
(
it
)
==
valueIfStop
)
ListeningStatus
.
STOPPED
else
ListeningStatus
.
LISTENING
})
@PublishedApi
@PublishedApi
internal
suspend
inline
fun
<
E
:
Subscribable
>
KClass
<
E
>.
subscribeUntilFalse
(
noinline
listener
:
suspend
(
E
)
->
Boolean
)
=
subscribeUntil
(
false
,
listener
)
internal
suspend
inline
fun
<
E
:
Subscribable
>
KClass
<
E
>.
subscribeUntilFalse
(
noinline
listener
:
suspend
(
E
)
->
Boolean
)
=
subscribeUntil
(
false
,
listener
)
...
@@ -157,7 +157,7 @@ inline class ListenerBuilder<out E : Subscribable>(
...
@@ -157,7 +157,7 @@ inline class ListenerBuilder<out E : Subscribable>(
suspend
inline
fun
always
(
noinline
listener
:
suspend
(
E
)
->
Unit
)
=
handler
{
listener
(
it
);
ListeningStatus
.
LISTENING
}
suspend
inline
fun
always
(
noinline
listener
:
suspend
(
E
)
->
Unit
)
=
handler
{
listener
(
it
);
ListeningStatus
.
LISTENING
}
suspend
inline
fun
<
T
>
until
(
until
:
T
,
noinline
listener
:
suspend
(
E
)
->
T
)
=
suspend
inline
fun
<
T
>
until
(
until
:
T
,
noinline
listener
:
suspend
(
E
)
->
T
)
=
handler
{
if
(
listener
(
it
)
==
=
until
)
ListeningStatus
.
STOPPED
else
ListeningStatus
.
LISTENING
}
handler
{
if
(
listener
(
it
)
==
until
)
ListeningStatus
.
STOPPED
else
ListeningStatus
.
LISTENING
}
suspend
inline
fun
untilFalse
(
noinline
listener
:
suspend
(
E
)
->
Boolean
)
=
until
(
false
,
listener
)
suspend
inline
fun
untilFalse
(
noinline
listener
:
suspend
(
E
)
->
Boolean
)
=
until
(
false
,
listener
)
suspend
inline
fun
untilTrue
(
noinline
listener
:
suspend
(
E
)
->
Boolean
)
=
until
(
true
,
listener
)
suspend
inline
fun
untilTrue
(
noinline
listener
:
suspend
(
E
)
->
Boolean
)
=
until
(
true
,
listener
)
...
...
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