fix(core): chat message bind view event

This commit is contained in:
rhunk 2023-12-27 17:10:40 +01:00
parent ccd9c40f29
commit 90d76c6412

View File

@ -1,6 +1,7 @@
package me.rhunk.snapenhance.core.event.events.impl
import android.view.View
import android.widget.LinearLayout
import me.rhunk.snapenhance.core.event.Event
class BindViewEvent(
@ -9,6 +10,7 @@ class BindViewEvent(
val view: View
): Event() {
inline fun chatMessage(block: (conversationId: String, messageId: String) -> Unit) {
if (view !is LinearLayout) return
val modelToString = prevModel.toString()
if (!modelToString.startsWith("ChatViewModel")) return
modelToString.substringAfter("messageId=").substringBefore(",").split(":").apply {