Commit Graph

78 Commits

Author SHA1 Message Date
ryoii
5929233cf9 Fix JvmMethodEventsTest.kt 2020-07-08 17:29:25 +08:00
Him188
9a57f35890 Support Nothing type for EventHandler; Add Java tests 2020-07-03 16:12:55 +08:00
Him188
0376bc6002 Fix test 2020-05-22 22:49:24 +08:00
Him188
abf367bd5c Fix test 2020-05-22 12:33:17 +08:00
Him188
46598d686c Cleanup;
Use interface for JavaFriendly APIs;
Deprecate event responder in Bot in the favor of their member functions;
Deprecate `Bot.queryUrl(image: Image)`` in the favor of the extension `Image.queryUrl`
2020-05-16 14:14:21 +08:00
Him188
d8ef80ea97 Adjust visibility 2020-05-11 09:48:53 +08:00
Him188
b0888a272e Use Message.plus extensions instead of member functions 2020-05-10 16:09:10 +08:00
Him188
90c0c5c549 Optimize experimental API usages 2020-05-10 02:22:16 +08:00
Him188
54794a6e49 Fix references 2020-05-10 00:59:12 +08:00
Him188
7525dc7c33 Add JvmMethodListeners.kt 2020-05-10 00:41:18 +08:00
Him188
0f0ca8e2cc Deprecate Bot.subscribe* for better Coroutine life cycle management; Add docs 2020-05-09 20:11:25 +08:00
Him188
9924d37e54 Misc improvements 2020-05-01 23:04:24 +08:00
Karlatemp
20af1fc3b6
Reset listeners before run a new task (#294)
* 支持监听优先级, 事件传递拦截

* Fix test

* 并发

* 优先级&并发

* Test

* Fix unused

* To GlobalEventListeners

* Add tests

* intercept with subscribeAlways

* test listener.complete()

* Add functions

* Fix test and add new test

* Test concurrent listening

* Test concurrent listening

* update broadcast

* Fix Boom

* Reset listeners before run a new task

Co-authored-by: Him188 <Him188@mamoe.net>
2020-05-01 22:59:34 +08:00
Karlatemp
c17e8a3263
支持监听优先级, 事件传递拦截 (#279)
* 支持监听优先级, 事件传递拦截

* Fix test

* 并发

* 优先级&并发

* Test

* Fix unused

* To GlobalEventListeners

* Add tests

* intercept with subscribeAlways

* test listener.complete()

* Add functions

* Fix test and add new test

* Test concurrent listening

* Test concurrent listening

* update broadcast

* Fix Boom

Co-authored-by: Him188 <Him188@mamoe.net>
2020-05-01 21:05:04 +08:00
Him188
16c440433f Introduce AbstractEvent acting as all events' super class 2020-05-01 14:44:12 +08:00
Him188
c89e2a7aa6 Improve performance 2020-04-27 22:25:53 +08:00
Him188
5aa85ba05c ? 2020-04-22 12:35:24 +08:00
Him188
b78d9ad3bb Rearrange tests 2020-04-22 11:40:44 +08:00
Him188
41dc1ffa0b Rearrange tests, close #126 2020-03-21 14:15:21 +08:00
Him188
e39fe5a46f Merge branch 'master' into kotlin-1.3.70
# Conflicts:
#	mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/QQAndroidClient.kt
#	mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/highway/HighwayHelper.kt
#	mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/highway/highway.kt
#	mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/WtLogin.kt
#	mirai-core/build.gradle.kts
#	mirai-core/src/androidMain/kotlin/net/mamoe/mirai/utils/addSuppressed.kt
#	mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/ExternalImage.kt
#	mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/channels.kt
#	mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/chunked.kt
#	mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/input.kt
#	mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/utils/addSuppressed.kt
2020-03-08 00:29:51 +08:00
Him188
6b54abe730 Revert "Use ktor.io than kotlinx.io"
This reverts commit ffee2e26
2020-03-07 18:49:59 +08:00
Him188
9bff0f77ec Kotlin 1.3.70 2020-03-05 09:44:50 +08:00
Him188
60b6eab73e Revert "Update to Kotlin 1.3.70"
This reverts commit 2e57e358
2020-03-04 13:58:01 +08:00
Him188
2e57e358c3 Update to Kotlin 1.3.70 2020-03-04 08:54:56 +08:00
Him188
ffee2e26fc Use ktor.io than kotlinx.io 2020-02-29 21:25:30 +08:00
Him188
932a3ef1f2 Review: misc improvements 2020-02-28 19:16:22 +08:00
ryoii
a52655e2ab Fix error in LockFreeLinkedListTest 2020-02-23 22:57:06 +08:00
Him188
4d79a699b2 Flatten messages 2020-02-23 20:06:45 +08:00
Him188
ccc6826e3a Redesign MessageChain:
Make MessageChain immutable
Introduce CombinedMessage, a left-biased list
Introduce MessageChainBuilder
2020-02-23 16:47:21 +08:00
Him188
9989894802 Fix test 2020-02-18 21:10:18 +08:00
Him188
35b8cfeb2a Fix test 2020-02-18 21:09:45 +08:00
Him188
a322ce735b Make CancellableEvent an interface, introduce AbstractCancellableEvent 2020-02-11 12:30:49 +08:00
Him188
7891ffc136 Make interface Event the base type of a event, remove interface Subscribable 2020-02-11 11:56:42 +08:00
Him188
cf7e325259 Add copyright 2020-02-09 01:01:36 +08:00
Him188
8c69eefcde Use groupCode as primary key 2020-02-03 02:45:40 +08:00
Him188
78ee01ded1 Fix bugs 2020-01-07 19:26:49 +08:00
Him188
7f338edcba Move files, modularize project 2019-12-28 16:54:57 +08:00
Him188
34236147e4 Fix the problem listening super events 2019-12-23 22:55:06 +08:00
Him188
22175eaabb Rewrite events 2019-12-23 22:28:35 +08:00
Him188
8225ee351f Remove ecdh.c 2019-12-23 22:02:34 +08:00
Him188
46b3889902 Add more tests 2019-12-20 11:26:26 +08:00
Him188
2f67f8363b Rewrite 2019-12-19 17:25:49 +08:00
Him188
0c6e09361d Rename protocol.tim to protocol.timpc 2019-12-17 11:04:04 +08:00
Him188
20f529871f Remove useless test 2019-12-15 18:26:01 +08:00
Him188
8994d6c9d0 Remove TestImageFile.kt 2019-12-15 18:10:12 +08:00
Him188
3c408b90e0 Fix GroupId.toGroupInternalId 2019-12-15 16:58:15 +08:00
Him188
8c58b83ec2 Enhance LockFreeLinkedList 2019-12-14 21:25:22 +08:00
Him188
a1d3cf0fd9 LockFreeLinkedList 2019-12-14 17:41:11 +08:00
Him188
941fcb3fdd Simplify 2019-12-13 12:11:45 +08:00
Him188
71f639ae0e Fix Experimental API use 2019-12-13 09:57:42 +08:00