mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-05-22 19:08:58 +02:00
fix(core): chat message bind view event
This commit is contained in:
parent
ccd9c40f29
commit
90d76c6412
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user