Skip to content

Commit

Permalink
delete: Remove window insets
Browse files Browse the repository at this point in the history
  • Loading branch information
SeokgyuYun committed Mar 25, 2024
1 parent 1c89079 commit 5cddc5f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
2 changes: 1 addition & 1 deletion dodam-design-system/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ publishing {
register<MavenPublication>("release") {
groupId = "com.b1nd.dodam"
artifactId = "dodam-design-system"
version = "0.1.5"
version = "0.1.6"

afterEvaluate {
from(components["release"])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
package com.b1nd.dodam.dds.theme

import android.app.Activity
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.SideEffect
import androidx.compose.ui.platform.LocalView
import androidx.core.view.WindowCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.WindowInsetsControllerCompat
import com.b1nd.dodam.dds.style.DodamDarkColorScheme
import com.b1nd.dodam.dds.style.DodamLightColorScheme
import com.b1nd.dodam.dds.style.DodamShapes
Expand All @@ -19,18 +13,6 @@ fun DodamTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
content: @Composable () -> Unit,
) {
val view = LocalView.current
if (!view.isInEditMode) {
SideEffect {
val window = (view.context as Activity).window
val windowInsetsController = WindowCompat.getInsetsController(window, window.decorView)
windowInsetsController.apply {
hide(WindowInsetsCompat.Type.systemBars())
systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
}
}
}

MaterialTheme(
colorScheme = if (darkTheme) DodamDarkColorScheme else DodamLightColorScheme,
typography = DodamTypography,
Expand Down

0 comments on commit 5cddc5f

Please sign in to comment.