Use the new UI entirely for the release build
This commit is contained in:
@@ -12,16 +12,12 @@ class LauncherActivity : Activity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
val useComposeUI =
|
||||
runBlocking {
|
||||
Settings.useComposeUI
|
||||
}
|
||||
|
||||
val targetActivity =
|
||||
if (useComposeUI) {
|
||||
ComposeActivity::class.java
|
||||
if (BuildConfig.DEBUG) {
|
||||
val useComposeUI = runBlocking { Settings.useComposeUI }
|
||||
if (useComposeUI) ComposeActivity::class.java else MainActivity::class.java
|
||||
} else {
|
||||
MainActivity::class.java
|
||||
ComposeActivity::class.java
|
||||
}
|
||||
|
||||
val launchIntent =
|
||||
|
||||
@@ -37,6 +37,7 @@ import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.navigation.NavController
|
||||
import io.nekohasekai.sfa.BuildConfig
|
||||
import io.nekohasekai.sfa.R
|
||||
import io.nekohasekai.sfa.database.Settings
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@@ -275,6 +276,7 @@ fun SettingsScreen(navController: NavController) {
|
||||
modifier = Modifier.padding(horizontal = 32.dp, vertical = 8.dp),
|
||||
)
|
||||
|
||||
if (BuildConfig.DEBUG) {
|
||||
Card(
|
||||
modifier =
|
||||
Modifier
|
||||
@@ -321,6 +323,7 @@ fun SettingsScreen(navController: NavController) {
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import io.nekohasekai.libbox.Libbox
|
||||
import io.nekohasekai.sfa.Application
|
||||
import io.nekohasekai.sfa.BuildConfig
|
||||
import io.nekohasekai.sfa.R
|
||||
import io.nekohasekai.sfa.constant.EnabledType
|
||||
import io.nekohasekai.sfa.database.Settings
|
||||
@@ -167,6 +168,7 @@ class SettingsFragment : Fragment() {
|
||||
binding.dynamicNotificationEnabled.text =
|
||||
EnabledType.from(dynamicNotification).getString(requireContext())
|
||||
binding.dynamicNotificationEnabled.setSimpleItems(R.array.enabled)
|
||||
binding.experimentalFeaturesCard.isVisible = BuildConfig.DEBUG
|
||||
binding.useComposeUIEnabled.text =
|
||||
EnabledType.from(useComposeUI).getString(requireContext())
|
||||
binding.useComposeUIEnabled.setSimpleItems(R.array.enabled)
|
||||
|
||||
@@ -5,8 +5,8 @@ buildscript {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.android.application' version '8.13.1' apply false
|
||||
id 'com.android.library' version '8.13.1' apply false
|
||||
id 'com.android.application' version '8.13.2' apply false
|
||||
id 'com.android.library' version '8.13.2' apply false
|
||||
id 'org.jetbrains.kotlin.android' version '2.2.0' apply false
|
||||
id 'com.google.devtools.ksp' version '2.2.0-2.0.2' apply false
|
||||
id 'com.github.triplet.play' version '3.12.1' apply false
|
||||
|
||||
Reference in New Issue
Block a user