Skip to content

Commit

Permalink
Merge pull request #111 from imashnake0/purge-accompanist
Browse files Browse the repository at this point in the history
Removed Accompanist
  • Loading branch information
imashnake0 authored Dec 22, 2023
2 parents eeba9c8 + d7b2bfa commit 721ae3c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
4 changes: 0 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ dependencies {
implementation(libs.hilt.navigationCompose)
ksp(libs.hilt.android.compiler)

// Accompanist
implementation(libs.accompanist.systemUiController)
implementation(libs.accompanist.placeholder)

coreLibraryDesugaring(libs.android.desugaring)

// Compose Destinations
Expand Down
14 changes: 2 additions & 12 deletions app/src/main/java/com/imashnake/animite/features/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,28 @@ import android.os.Bundle
import android.view.WindowManager
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.core.tween
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.slideInVertically
import androidx.compose.animation.slideOutVertically
import androidx.compose.foundation.background
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.SideEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.dimensionResource
import androidx.core.view.WindowCompat
import androidx.navigation.compose.currentBackStackEntryAsState
import androidx.navigation.compose.rememberNavController
import com.google.accompanist.systemuicontroller.rememberSystemUiController
import com.imashnake.animite.R
import com.imashnake.animite.features.destinations.MediaPageDestination
import com.imashnake.animite.features.media.MediaPageArgs
Expand All @@ -50,7 +46,7 @@ class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

WindowCompat.setDecorFitsSystemWindows(window, false)
enableEdgeToEdge()

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
window.attributes.layoutInDisplayCutoutMode =
Expand All @@ -59,12 +55,6 @@ class MainActivity : ComponentActivity() {

setContent {
AnimiteTheme {
val systemUiController = rememberSystemUiController()
val darkIcons = !isSystemInDarkTheme()
SideEffect {
systemUiController.setSystemBarsColor(Color.Transparent, darkIcons = darkIcons)
}

MainScreen(Modifier.fillMaxSize())
}
}
Expand Down
8 changes: 0 additions & 8 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ dependencyAnalysis = { id = "com.autonomousapps.dependency-analysis", version.re
# https://github.com/google/desugar_jdk_libs/blob/master/CHANGELOG.md.
desugaring = "2.0.4"

# TODO: `SystemUiController` is deprecated.
# https://github.com/android/nowinandroid/pull/817
# Accompanist
# https://github.com/google/accompanist/releases.
accompanist = "0.32.0"

# Android Gradle Plugin
# https://developer.android.com/studio/releases/gradle-plugin.
agp = "8.2.0"
Expand Down Expand Up @@ -111,8 +105,6 @@ kotlin-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coro
hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "dagger" }
hilt-android-compiler = { group = "com.google.dagger", name = "hilt-android-compiler", version.ref = "dagger" }
hilt-navigationCompose = { group = "androidx.hilt", name = "hilt-navigation-compose", version.ref = "hilt" }
accompanist-systemUiController = { group = "com.google.accompanist", name = "accompanist-systemuicontroller", version.ref = "accompanist" }
accompanist-placeholder = { group = "com.google.accompanist", name = "accompanist-placeholder", version.ref = "accompanist" }
test-junit = { group = "junit", name = "junit", version.ref = "junit" }

[bundles]
Expand Down

0 comments on commit 721ae3c

Please sign in to comment.