android: fix compose/send message not resetting some state (#639)

This commit is contained in:
JRoberts
2022-05-12 11:08:14 +04:00
committed by GitHub
parent aa9c2f3228
commit e174c43bec
2 changed files with 2 additions and 0 deletions

View File

@@ -35,6 +35,7 @@ fun TerminalView(chatModel: ChatModel, close: () -> Unit) {
withApi {
// show "in progress"
chatModel.controller.sendCmd(CC.Console(composeState.value.message))
composeState.value = ComposeState()
// hide "in progress"
}
},

View File

@@ -185,6 +185,7 @@ fun ComposeView(
fun clearState() {
composeState.value = ComposeState()
textStyle.value = smallFont
chosenImage.value = null
chosenFile.value = null
linkUrl.value = null