mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 02:20:14 +08:00
commit
d80af0e8bb
@ -112,7 +112,7 @@ inline fun <reified E : Subscribable, T> CoroutineScope.subscribeUntil(valueIfSt
|
|||||||
* @see subscribe 获取更多说明
|
* @see subscribe 获取更多说明
|
||||||
*/
|
*/
|
||||||
inline fun <reified E : Subscribable, T> CoroutineScope.subscribeWhile(valueIfContinue: T, crossinline listener: suspend E.(E) -> T): Listener<E> =
|
inline fun <reified E : Subscribable, T> CoroutineScope.subscribeWhile(valueIfContinue: T, crossinline listener: suspend E.(E) -> T): Listener<E> =
|
||||||
E::class.subscribeInternal(Handler { if (it.listener(it) !== valueIfContinue) ListeningStatus.STOPPED else ListeningStatus.LISTENING })
|
E::class.subscribeInternal(Handler { if (it.listener(it) != valueIfContinue) ListeningStatus.STOPPED else ListeningStatus.LISTENING })
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user