From 8b73c35e43ecdd1f8658b3ee75552ded132aaa22 Mon Sep 17 00:00:00 2001 From: firelight <147925818+fire-light42@users.noreply.github.com> Date: Tue, 31 Oct 2023 00:34:01 +0100 Subject: [PATCH] faster account skip startup --- .../ui/account/AccountSelectActivity.kt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/account/AccountSelectActivity.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/account/AccountSelectActivity.kt index 152c19dc..a2c34bf0 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/account/AccountSelectActivity.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/account/AccountSelectActivity.kt @@ -22,6 +22,15 @@ class AccountSelectActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + val accounts = getAccounts(this@AccountSelectActivity) + + // Don't show account selection if there is only + // one account that exists + if (accounts.count() <= 1) { + navigateToMainActivity() + return + } + CommonActivity.init(this) loadThemes(this) @@ -35,14 +44,6 @@ class AccountSelectActivity : AppCompatActivity() { val recyclerView: RecyclerView = binding.root.findViewById(R.id.account_recycler_view) - val accounts = getAccounts(this@AccountSelectActivity) - - // Don't show account selection if there is only - // one account that exists - if (accounts.count() <= 1) { - navigateToMainActivity() - return - } val adapter = AccountAdapter(accounts) { selectedAccount -> // Handle the selected account