Skip to content

Commit

Permalink
fix: send button disabled after writing message [WPB-9421]
Browse files Browse the repository at this point in the history
  • Loading branch information
saleniuk committed May 27, 2024
1 parent b06b525 commit cd60778
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,17 @@ internal class StateSyncingModifierNode(
}

private fun observeTextState(fireOnValueChanged: Boolean = true) {
lateinit var text: TextFieldState
lateinit var value: TextFieldValue

observeReads {
text = state
value = TextFieldValue(
state.text.toString(),
state.selection,
state.composition
)
}
if (fireOnValueChanged) {
val newValue = TextFieldValue(
text = text.toString(),
selection = text.selection,
composition = text.composition
)
onValueChanged(newValue)
onValueChanged(value)
}
}
}

0 comments on commit cd60778

Please sign in to comment.