Enhance performance

This commit is contained in:
Him188 2020-01-01 20:28:32 +08:00
parent 1dc0255b49
commit 77dce11e96

View File

@ -127,8 +127,8 @@ class MessageSubscribersBuilder<T : MessagePacket<*, *>>(
* 无任何触发条件.
*/
@MessageDsl
inline fun always(crossinline onEvent: @MessageDsl suspend T.(String) -> Unit): Listener<T> {
return content({ true }, onEvent)
fun always(onEvent: @MessageDsl suspend T.(String) -> Unit): Listener<T> {
return subscriber(onEvent)
}
/**