No need to use `also` here.
This commit is contained in:
parent
7e40b933c0
commit
7242ad48c2
|
@ -150,7 +150,7 @@ class MessageComposerViewModel @AssistedInject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun handleOnTextChanged(action: MessageComposerAction.OnTextChanged) {
|
private fun handleOnTextChanged(action: MessageComposerAction.OnTextChanged) {
|
||||||
val needsSendButtonVisibilityUpdate = currentComposerText.isBlank() != action.text.isBlank()
|
val needsSendButtonVisibilityUpdate = currentComposerText.isBlank() != action.text.isBlank()
|
||||||
currentComposerText = SpannableString(action.text)
|
currentComposerText = SpannableString(action.text)
|
||||||
if (needsSendButtonVisibilityUpdate) {
|
if (needsSendButtonVisibilityUpdate) {
|
||||||
updateIsSendButtonVisibility(true)
|
updateIsSendButtonVisibility(true)
|
||||||
|
@ -239,9 +239,8 @@ class MessageComposerViewModel @AssistedInject constructor(
|
||||||
|
|
||||||
private fun handleSendMessage(room: Room, action: MessageComposerAction.SendMessage) {
|
private fun handleSendMessage(room: Room, action: MessageComposerAction.SendMessage) {
|
||||||
withState { state ->
|
withState { state ->
|
||||||
analyticsTracker.capture(state.toAnalyticsComposer()).also {
|
analyticsTracker.capture(state.toAnalyticsComposer())
|
||||||
setState { copy(startsThread = false) }
|
setState { copy(startsThread = false) }
|
||||||
}
|
|
||||||
when (state.sendMode) {
|
when (state.sendMode) {
|
||||||
is SendMode.Regular -> {
|
is SendMode.Regular -> {
|
||||||
when (val parsedCommand = commandParser.parseSlashCommand(
|
when (val parsedCommand = commandParser.parseSlashCommand(
|
||||||
|
|
Loading…
Reference in New Issue