Remove legacy View-based UI
Keep only Compose UI, removing old View-based Activities, Fragments, and layouts. QRScanActivity and PerAppProxyActivity are retained as they are still used by Compose UI.
This commit is contained in:
@@ -4,25 +4,13 @@ import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import io.nekohasekai.sfa.compose.ComposeActivity
|
||||
import io.nekohasekai.sfa.database.Settings
|
||||
import io.nekohasekai.sfa.ui.MainActivity
|
||||
import kotlinx.coroutines.runBlocking
|
||||
|
||||
class LauncherActivity : Activity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
val targetActivity =
|
||||
if (BuildConfig.DEBUG) {
|
||||
val useComposeUI = runBlocking { Settings.useComposeUI }
|
||||
if (useComposeUI) ComposeActivity::class.java else MainActivity::class.java
|
||||
} else {
|
||||
ComposeActivity::class.java
|
||||
}
|
||||
|
||||
val launchIntent =
|
||||
Intent(this, targetActivity).apply {
|
||||
// Transfer any intent data from launcher
|
||||
Intent(this, ComposeActivity::class.java).apply {
|
||||
intent?.let {
|
||||
action = it.action
|
||||
data = it.data
|
||||
|
||||
Reference in New Issue
Block a user