Redesign MultiMsg #1667
What does this mean?
我觉得没有必要, 用 Random.Default 就可以了
方法体比较复杂, 有没有可能抽几个小函数 (如果更好)?
println
println
逻辑比较复杂, mark一下明天再看
顺便去除 run, 减少一层缩进
把重载放到一起方便阅读
我觉得叫 concat 可能更好
tryDispose would be neater
使用 const val 代替 magics -1 和 -2, if appropriate.
I'd prefer
public fun currentCound(): Int = count.get()
for not introducing a new concept 'status'
这个用在哪里了?
release 多次 (导致 count < -2) 会怎么办?
public fun setInitialized() {
If you useuninitialized, you'd also use initialized over init.
public fun setLocked() {
'To' is redundant. Removing for clarity. Same for the other 3 'To's.
Test 缺少 release 测试
user's code
ImagePatcher
dataType in 1...127?
var19->dataStr?
var7->pendingDataStr?
var6->topicsIndex
var4->topicsId?
getImageIdFromStr?
imageId?
Add a comment: OGI->OfflineGroupImage
access->accessLock?
加了点命名建议(
目前意义未知先不改
不妨使用先随机 再递增的方式?
这有可能抛出 ISE. 这将是个 breaking change (createImage 不再线程安全)
有可能是我理解错了 findCache, 见 https://github.com/mamoe/mirai/pull/1667#discussion_r748933681
如果 findCache 确实是我说的那样, 那773行这样写的就没问题, 否则可能有问题
Any tests for ImagePatcher? It's essential to ensure Image works properly.
Approved these changes.
Optimize commit history and prepare for Rebase and Merge
Him188
Karlatemp
Changes
See commit message
Issues:
New Features
Superseded PRs
------