android: fix compose view clearing state prematurely (#689)

This commit is contained in:
JRoberts
2022-05-23 13:44:49 +04:00
committed by GitHub
parent d572cfbc09
commit f7eeb4d1e3

View File

@@ -326,6 +326,7 @@ fun ComposeView(
mc = updateMsgContent(oldMsgContent)
)
if (updatedItem != null) chatModel.upsertChatItem(cInfo, updatedItem.chatItem)
clearState()
}
}
}
@@ -369,11 +370,13 @@ fun ComposeView(
mc = mc
)
if (aChatItem != null) chatModel.addChatItem(cInfo, aChatItem.chatItem)
clearState()
}
} else {
clearState()
}
}
}
clearState()
}
fun onMessageChange(s: String) {