Skip to content

Commit

Permalink
ktlint checks fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdyrod committed Apr 29, 2024
1 parent b2bcecb commit 7a6f48f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.platform.LocalContext

//TODO - hack to get navigation bar padding does not take into account IME padding (reflection)
//TODO - Should be remove when google publish https://issuetracker.google.com/issues/274872542
// TODO - hack to get navigation bar padding does not take into account IME padding (reflection)
// TODO - Should be remove when google publish https://issuetracker.google.com/issues/274872542
@Composable
@SuppressLint("DiscouragedApi")
actual fun rememberDimensionByName(name: String): Int {
Expand All @@ -15,4 +15,4 @@ actual fun rememberDimensionByName(name: String): Int {
val id = resources.getIdentifier(name, "dimen", "android")
if (id == 0) 0 else resources.getDimensionPixelSize(id)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,8 @@ fun BottomSheetShell(
) {
val sheetState = rememberModalBottomSheetState(true)
val scope = rememberCoroutineScope()

//TODO - hack to get navigation bar padding does not take into account IME padding (reflection)
//TODO - Should be remove when google publish https://issuetracker.google.com/issues/274872542
// TODO - hack to get navigation bar padding does not take into account IME padding (reflection)
// TODO - Should be remove when google publish https://issuetracker.google.com/issues/274872542
val topInsets = WindowInsets(top = rememberDimensionByName("status_bar_height"))
val bottomInsets = WindowInsets(bottom = rememberDimensionByName("navigation_bar_height"))

Expand Down Expand Up @@ -195,13 +194,13 @@ fun BottomSheetShell(
}
}
},
windowInsets = topInsets
windowInsets = topInsets,
) {
val canScrollForward by derivedStateOf { contentScrollState.canScrollForward }

Column(
modifier = Modifier
.padding(bottomInsets.asPaddingValues())
.padding(bottomInsets.asPaddingValues()),
) {
Column(
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package org.hisp.dhis.mobile.ui.designsystem.component.internal.bottomSheet

import androidx.compose.runtime.Composable

//TODO - hack to get navigation bar padding does not take into account IME padding (reflection)
//TODO - Should be remove when google publish https://issuetracker.google.com/issues/274872542
// TODO - hack to get navigation bar padding does not take into account IME padding (reflection)
// TODO - Should be remove when google publish https://issuetracker.google.com/issues/274872542

@Composable
expect fun rememberDimensionByName(name: String): Int
expect fun rememberDimensionByName(name: String): Int
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package org.hisp.dhis.mobile.ui.designsystem.component.internal.bottomSheet

import androidx.compose.runtime.Composable

//TODO - hack to get navigation bar padding does not take into account IME padding
//TODO - Should be remove when google published https://issuetracker.google.com/issues/274872542
// TODO - hack to get navigation bar padding does not take into account IME padding
// TODO - Should be remove when google published https://issuetracker.google.com/issues/274872542
@Composable
actual fun rememberDimensionByName(name: String) = 0
actual fun rememberDimensionByName(name: String) = 0

0 comments on commit 7a6f48f

Please sign in to comment.