refactor(chat): single owner for display kinds and REST row ids (#1364)

This commit is contained in:
m57 authored and GitHub committed 2026-09-28 20:26:13 +03:00
1 parent 9aefc5bfc7
commit 12ddef09a0
11 files changed
+107 -33

No files matched your search

@@ -66,7 +66,9 @@ internal fun canonicalMessageOrder(
id: String,
sessionId: String,
): Long? {
val prefix = "rest-$sessionId-"
val prefix =
com.m57.hermescontrol.ui.chat.RestMessageId
.sessionPrefix(sessionId)
if (!id.startsWith(prefix)) return null
val suffix = id.removePrefix(prefix)
return suffix.takeIf { it.isNotEmpty() && it.all { char -> char in '0'..'9' } }?.toLongOrNull()