diff --git a/app/build.gradle b/app/build.gradle index 409ce5f1d..6096909c8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -19,8 +19,8 @@ android { applicationId 'org.koitharu.kotatsu' minSdk = 21 targetSdk = 35 - versionCode = 1001 - versionName = '8.0-b1' + versionCode = 1002 + versionName = '8.0-b2' generatedDensities = [] testInstrumentationRunner 'org.koitharu.kotatsu.HiltTestRunner' ksp { diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/core/BaseApp.kt b/app/src/main/kotlin/org/koitharu/kotatsu/core/BaseApp.kt index 47833c2ee..1ee78bd06 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/core/BaseApp.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/core/BaseApp.kt @@ -83,7 +83,6 @@ open class BaseApp : Application(), Configuration.Provider { return } AppCompatDelegate.setDefaultNightMode(settings.theme) - AppCompatDelegate.setApplicationLocales(settings.appLocales) // TLS 1.3 support for Android < 10 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) { Security.insertProviderAt(Conscrypt.newProvider(), 1) diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/core/ui/BaseActivity.kt b/app/src/main/kotlin/org/koitharu/kotatsu/core/ui/BaseActivity.kt index 0f03503c5..e8ba0415f 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/core/ui/BaseActivity.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/core/ui/BaseActivity.kt @@ -1,14 +1,16 @@ package org.koitharu.kotatsu.core.ui +import android.content.Context import android.content.Intent import android.content.res.Configuration -import android.graphics.Color +import android.os.Build import android.os.Bundle import android.view.KeyEvent import android.view.View import android.widget.Toast import androidx.annotation.CallSuper import androidx.appcompat.app.AppCompatActivity +import androidx.appcompat.app.AppCompatDelegate import androidx.appcompat.view.ActionMode import androidx.appcompat.widget.Toolbar import androidx.core.app.ActivityCompat @@ -47,10 +49,17 @@ abstract class BaseActivity : @JvmField val actionModeDelegate = ActionModeDelegate() - private var defaultStatusBarColor = Color.TRANSPARENT + private lateinit var entryPoint: BaseActivityEntryPoint + + override fun attachBaseContext(newBase: Context) { + entryPoint = EntryPointAccessors.fromApplication(newBase.applicationContext) + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) { + AppCompatDelegate.setApplicationLocales(entryPoint.settings.appLocales) + } + super.attachBaseContext(newBase) + } override fun onCreate(savedInstanceState: Bundle?) { - val entryPoint = EntryPointAccessors.fromApplication(this) val settings = entryPoint.settings isAmoledTheme = settings.isAmoledTheme setTheme(settings.colorScheme.styleResId) diff --git a/app/src/main/res/color-v23/bg_dim_bottomsheet.xml b/app/src/main/res/color-v23/bg_dim_bottomsheet.xml deleted file mode 100644 index c2e9c2c67..000000000 --- a/app/src/main/res/color-v23/bg_dim_bottomsheet.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/color/bg_dim_bottomsheet.xml b/app/src/main/res/color/bg_dim_bottomsheet.xml deleted file mode 100644 index 209550cf3..000000000 --- a/app/src/main/res/color/bg_dim_bottomsheet.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/app/src/main/res/layout/activity_details.xml b/app/src/main/res/layout/activity_details.xml index 59ee39455..6b5a38641 100644 --- a/app/src/main/res/layout/activity_details.xml +++ b/app/src/main/res/layout/activity_details.xml @@ -322,7 +322,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" - android:background="@color/bg_dim_bottomsheet" + android:background="?colorSurfaceContainerLow" android:elevation="9dp" tools:layout_height="10dp" /> diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4ec0d38cf..5fc3b10fc 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -31,7 +31,7 @@ material = "1.13.0-alpha10" moshi = "1.15.2" okhttp = "4.12.0" okio = "3.10.2" -parsers = "00a769bfd5" +parsers = "1.6" preference = "1.2.1" recyclerview = "1.4.0" room = "2.6.1"