Skip to content

Commit

Permalink
fix: FileSharing menu - no gaps
Browse files Browse the repository at this point in the history
  • Loading branch information
borichellow committed Feb 7, 2025
1 parent 555b9aa commit 7d52f27
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ fun EnabledMessageComposer(
offset = if (isImeVisible) {
IntOffset(0, 0)
} else {
with(density) { IntOffset(0, -dimensions().spacing64x.toPx().roundToInt()) }
with(density) { IntOffset(0, -dimensions().spacing48x.toPx().roundToInt()) }
},
onDismissRequest = {
hideRipple = true
Expand All @@ -403,13 +403,6 @@ fun EnabledMessageComposer(
modifier = Modifier
.fillMaxWidth()
.height(inputStateHolder.calculateOptionsMenuHeight(additionalOptionStateHolder.additionalOptionsSubMenuState))
.padding(
horizontal = if (isImeVisible) {
dimensions().spacing0x
} else {
dimensions().spacing8x
}
)
.background(
color = Color.Transparent,
shape = shape
Expand Down Expand Up @@ -489,7 +482,8 @@ private fun calculateOptionsPath(cornerRadiusPx: Float, rippleProgress: Float, i
shapePath.addRoundRect(
roundRect = RoundRect(
rect = size.toRect(),
cornerRadius = CornerRadius(cornerRadiusPx, cornerRadiusPx)
topRight = CornerRadius(cornerRadiusPx, cornerRadiusPx),
topLeft = CornerRadius(cornerRadiusPx, cornerRadiusPx)
)
)
return ripplePath.and(shapePath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.foundation.text.input.TextFieldLineLimits
import androidx.compose.foundation.text.input.KeyboardActionHandler
import androidx.compose.foundation.text.input.TextFieldLineLimits
import androidx.compose.foundation.text.input.TextFieldState
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
Expand Down Expand Up @@ -258,13 +258,15 @@ private fun InputContent(
UsersTypingIndicatorForConversation(conversationId = conversationId)
}
}
MessageSendActions(
onSendButtonClicked = onSendButtonClicked,
sendButtonEnabled = canSendMessage,
selfDeletionTimer = viewModel.state(),
onChangeSelfDeletionClicked = onChangeSelfDeletionClicked,
modifier = Modifier.padding(end = dimensions().spacing8x)
)
if (canSendMessage || showOptions) {
MessageSendActions(
onSendButtonClicked = onSendButtonClicked,
sendButtonEnabled = canSendMessage,
selfDeletionTimer = viewModel.state(),
onChangeSelfDeletionClicked = onChangeSelfDeletionClicked,
modifier = Modifier.padding(end = dimensions().spacing8x)
)
}
}
}
}
Expand Down

0 comments on commit 7d52f27

Please sign in to comment.