From b65728f3120014a766d552e2571ade1512d80f37 Mon Sep 17 00:00:00 2001 From: windyboy Date: Thu, 10 Sep 2026 21:03:04 +0800 Subject: [PATCH] =?UTF-8?q?refactor(ingress):=20=E4=BF=A1=E7=AE=B1?= =?UTF-8?q?=E8=BF=9E=E7=BB=AD=E4=B8=8A=E7=95=8C=E9=81=8D=E5=8E=86=E6=94=B9?= =?UTF-8?q?=E7=94=A8=E8=A7=A3=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit contiguousUpTo 由 row.msgId 改为 for ((msgId, _) in rows);MailboxRow 是 data class, 取值结果相同,行为不变,无配置与迁移影响。 验证:./gradlew test 通过。 --- .../kotlin/com/gzzn/omms/msgexchange/ingress/InboxPoller.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/gzzn/omms/msgexchange/ingress/InboxPoller.kt b/src/main/kotlin/com/gzzn/omms/msgexchange/ingress/InboxPoller.kt index d0a5ef4..d9b6e02 100644 --- a/src/main/kotlin/com/gzzn/omms/msgexchange/ingress/InboxPoller.kt +++ b/src/main/kotlin/com/gzzn/omms/msgexchange/ingress/InboxPoller.kt @@ -108,9 +108,9 @@ class InboxPoller( private fun contiguousUpTo(from: Long, rows: List): Long? { var expected = from + 1 var last: Long? = null - for (row in rows) { - if (row.msgId != expected) break - last = row.msgId + for ((msgId, _) in rows) { + if (msgId != expected) break + last = msgId expected++ } return last