diff --git a/app/build.gradle.kts b/app/build.gradle.kts index b8f0da1f..4a52e01f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -15,8 +15,8 @@ android { applicationId = "com.aliernfrog.pftool" minSdk = 23 targetSdk = 34 - versionCode = 16100 - versionName = "1.6.1" + versionCode = 16200 + versionName = "1.6.2" vectorDrawables { useSupportLibrary = true } } @@ -87,7 +87,7 @@ dependencies { implementation("androidx.activity:activity-compose:1.8.2") implementation("androidx.navigation:navigation-compose:2.7.6") implementation("io.insert-koin:koin-androidx-compose:3.5.3") - implementation("aliernfrog:top-toast-compose:1.4.0-alpha04") + implementation("aliernfrog:top-toast-compose:1.4.0-alpha05") implementation("com.lazygeniouz:dfc:1.0.8") implementation("io.coil-kt:coil-compose:2.5.0") implementation("com.github.jeziellago:compose-markdown:0.3.7") diff --git a/app/src/main/java/com/aliernfrog/pftool/ui/theme/Theme.kt b/app/src/main/java/com/aliernfrog/pftool/ui/theme/Theme.kt index c4982758..c2fec96d 100644 --- a/app/src/main/java/com/aliernfrog/pftool/ui/theme/Theme.kt +++ b/app/src/main/java/com/aliernfrog/pftool/ui/theme/Theme.kt @@ -1,5 +1,6 @@ package com.aliernfrog.pftool.ui.theme +import android.annotation.SuppressLint import android.app.Activity import android.os.Build import androidx.compose.foundation.isSystemInDarkTheme @@ -15,9 +16,11 @@ import androidx.compose.ui.graphics.toArgb import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalView import androidx.core.view.WindowCompat +import com.aliernfrog.pftool.ui.activity.MainActivity val supportsMaterialYou = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S +@SuppressLint("NewApi") @Composable fun PFToolTheme( darkTheme: Boolean = isSystemInDarkTheme(), @@ -34,6 +37,7 @@ fun PFToolTheme( val view = LocalView.current if (!view.isInEditMode) SideEffect { + if (view.context !is MainActivity) return@SideEffect val activity = view.context as Activity val insetsController = WindowCompat.getInsetsController(activity.window, view) val transparentColor = Color.Transparent.toArgb() diff --git a/build.gradle.kts b/build.gradle.kts index d0f5081f..0234b2f3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("com.android.application") version "8.2.0" apply false - id("com.android.library") version "8.2.0" apply false + id("com.android.application") version "8.2.2" apply false + id("com.android.library") version "8.2.2" apply false id("org.jetbrains.kotlin.android") version "1.9.22" apply false } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e0cf268a..049169f6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Thu May 12 18:53:32 TRT 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME