Skip to content

Commit

Permalink
Update project
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbel committed Nov 25, 2024
1 parent 1efece0 commit 3f62bbe
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package org.michaelbel.movies.settings.model
import android.os.Build
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import com.google.android.material.color.DynamicColors
import org.michaelbel.movies.ui.ktx.displayCutoutWindowInsets

Expand Down Expand Up @@ -61,4 +62,7 @@ internal actual val isAboutFeatureEnabled: Boolean
get() = true

internal actual val settingsWindowInsets: WindowInsets
@Composable get() = displayCutoutWindowInsets
@Composable get() = displayCutoutWindowInsets

internal actual val bottomBarModifier: Modifier
get() = Modifier
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.michaelbel.movies.settings.model

import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.ui.Modifier

internal expect val isNavigationIconVisible: Boolean
internal expect val isLanguageFeatureEnabled: Boolean
Expand All @@ -20,4 +21,5 @@ internal expect val isGithubFeatureEnabled: Boolean
internal expect val isReviewAppFeatureEnabled: Boolean
internal expect val isUpdateAppFeatureEnabled: Boolean
internal expect val isAboutFeatureEnabled: Boolean
internal expect val settingsWindowInsets: WindowInsets
internal expect val settingsWindowInsets: WindowInsets
internal expect val bottomBarModifier: Modifier
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import org.michaelbel.movies.settings.ktx.rememberAndPinAppWidgetProvider
import org.michaelbel.movies.settings.ktx.rememberPostNotificationsPermissionHandler
import org.michaelbel.movies.settings.ktx.requestTileService
import org.michaelbel.movies.settings.model.SettingsData
import org.michaelbel.movies.settings.model.bottomBarModifier
import org.michaelbel.movies.settings.model.isAboutFeatureEnabled
import org.michaelbel.movies.settings.model.isAppIconFeatureEnabled
import org.michaelbel.movies.settings.model.isBiometricFeatureEnabled
Expand Down Expand Up @@ -209,6 +210,7 @@ fun SettingsRoute(
windowInsets = settingsWindowInsets,
snackbarHostState = snackbarHostState,
isNavigationIconVisible = isNavigationIconVisible,
bottomBarModifier = bottomBarModifier,
modifier = modifier
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ internal fun SettingsScreenContent(
windowInsets: WindowInsets,
snackbarHostState: SnackbarHostState,
isNavigationIconVisible: Boolean,
bottomBarModifier: Modifier,
modifier: Modifier = Modifier
) {
val scope = rememberCoroutineScope()
Expand Down Expand Up @@ -81,7 +82,9 @@ internal fun SettingsScreenContent(
if (settingsData.aboutData.isFeatureEnabled) {
SettingsVersionBox(
aboutData = settingsData.aboutData,
modifier = Modifier.windowInsetsPadding(windowInsets)
modifier = Modifier
.then(bottomBarModifier)
.windowInsetsPadding(windowInsets)
)
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.michaelbel.movies.settings.model

import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp

internal actual val isNavigationIconVisible: Boolean
Expand Down Expand Up @@ -58,4 +60,7 @@ internal actual val isAboutFeatureEnabled: Boolean
get() = true

internal actual val settingsWindowInsets: WindowInsets
get() = WindowInsets(0.dp, 0.dp, 0.dp, 0.dp)
get() = WindowInsets(0.dp, 0.dp, 0.dp, 0.dp)

internal actual val bottomBarModifier: Modifier
get() = Modifier.navigationBarsPadding()
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.michaelbel.movies.settings.model

import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp

internal actual val isNavigationIconVisible: Boolean
Expand Down Expand Up @@ -58,4 +59,7 @@ internal actual val isAboutFeatureEnabled: Boolean
get() = true

internal actual val settingsWindowInsets: WindowInsets
get() = WindowInsets(0.dp, 0.dp, 0.dp, 0.dp)
get() = WindowInsets(0.dp, 0.dp, 0.dp, 0.dp)

internal actual val bottomBarModifier: Modifier
get() = Modifier

0 comments on commit 3f62bbe

Please sign in to comment.