Skip to content

Commit

Permalink
fix: add missing insets in modals and below section selectors (#121)
Browse files Browse the repository at this point in the history
* fix: add bottom padding in bottom sheets

* fix: add padding in filtered contents (bookmarks, votes, moderated)
  • Loading branch information
AkesiSeli authored Nov 23, 2024
1 parent 0eafb69 commit abb5a81
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ fun CustomModalBottomSheet(
onSelected?.invoke(null)
},
) {
Column {
Column(
modifier = Modifier.padding(bottom = Spacing.xs),
) {
Text(
modifier = Modifier.fillMaxWidth(),
textAlign = TextAlign.Center,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ fun SelectNumberBottomSheet(
onSelected?.invoke(null)
},
) {
Column {
Column(
modifier = Modifier.padding(bottom = Spacing.xs),
) {
Text(
modifier = Modifier.fillMaxWidth(),
textAlign = TextAlign.Center,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.navigationBars
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Button
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
Expand Down Expand Up @@ -50,7 +51,9 @@ fun SliderBottomSheet(
onSelected?.invoke(null)
},
) {
Column {
Column(
modifier = Modifier.padding(bottom = Spacing.xs),
) {
Text(
modifier = Modifier.fillMaxWidth(),
textAlign = TextAlign.Center,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ fun SortBottomSheet(
onSelected?.invoke(null)
},
) {
Column {
Column(
modifier = Modifier.padding(bottom = Spacing.xs),
) {
var level by remember { mutableStateOf<SortBottomSheetLevel>(SortBottomSheetLevel.Main) }
Crossfade(
targetState = level,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ class FilteredContentsScreen(
item {
if (!uiState.isPostOnly) {
SectionSelector(
modifier = Modifier.padding(vertical = Spacing.s),
titles =
listOf(
LocalStrings.current.profileSectionPosts,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ fun ManageAccountsBottomSheet(
onDismiss?.invoke(false)
},
) {
Column {
Column(
modifier = Modifier.padding(bottom = Spacing.xs),
) {
Text(
modifier = Modifier.fillMaxWidth(),
textAlign = TextAlign.Center,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ fun SelectInstanceBottomSheet(
onSelected?.invoke(null)
},
) {
Column {
Column(
modifier = Modifier.padding(bottom = Spacing.xs),
) {
Box(
modifier = Modifier.fillMaxWidth().padding(top = Spacing.s),
) {
Expand Down

0 comments on commit abb5a81

Please sign in to comment.