Skip to content

Commit

Permalink
AND-117 Fix identity creation back stack (#209)
Browse files Browse the repository at this point in the history
* Remove unused legacy identity creation screens

* Remove unused identity creation code from the main screen

* Finish identity creation flow stack after creation

* Remove unused welcome promo resources
  • Loading branch information
Radiokot authored Nov 26, 2024
1 parent e857bef commit 585a7dd
Show file tree
Hide file tree
Showing 28 changed files with 7 additions and 776 deletions.
8 changes: 0 additions & 8 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,19 +236,11 @@
android:name=".ui.auth.setupbiometrics.AuthSetupBiometricsActivity"
android:screenOrientation="portrait"
android:theme="@style/CCX_Screen" />
<activity
android:name=".ui.identity.identitycreate.IdentityIntroFlow"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<activity
android:name=".ui.identity.identityproviderlist.IdentityProviderListActivity"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/CCX_Screen" />
<activity
android:name=".ui.identity.identityproviderpolicywebview.IdentityProviderPolicyWebViewActivity"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<activity
android:name=".ui.identity.identityproviderwebview.IdentityProviderWebviewActivity"
android:exported="true"
Expand Down
17 changes: 0 additions & 17 deletions app/src/main/assets/identity_intro_flow_en_1.html

This file was deleted.

22 changes: 0 additions & 22 deletions app/src/main/assets/identity_intro_flow_en_2.html

This file was deleted.

21 changes: 0 additions & 21 deletions app/src/main/assets/identity_intro_flow_en_3.html

This file was deleted.

20 changes: 0 additions & 20 deletions app/src/main/assets/identity_intro_flow_en_4.html

This file was deleted.

12 changes: 0 additions & 12 deletions app/src/main/java/com/concordium/wallet/ui/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import com.concordium.wallet.ui.common.delegates.AuthDelegate
import com.concordium.wallet.ui.common.delegates.AuthDelegateImpl
import com.concordium.wallet.ui.common.delegates.IdentityStatusDelegate
import com.concordium.wallet.ui.common.delegates.IdentityStatusDelegateImpl
import com.concordium.wallet.ui.identity.identityproviderlist.IdentityProviderListActivity
import com.concordium.wallet.ui.more.import.ImportActivity
import com.concordium.wallet.ui.more.moreoverview.MoreOverviewFragment
import com.concordium.wallet.ui.news.NewsOverviewFragment
Expand All @@ -36,7 +35,6 @@ class MainActivity : BaseActivity(R.layout.activity_main, R.string.accounts_over
IdentityStatusDelegate by IdentityStatusDelegateImpl() {

companion object {
const val EXTRA_CREATE_FIRST_IDENTITY = "EXTRA_CREATE_FIRST_IDENTITY"
const val EXTRA_WALLET_CONNECT_URI = "wc_uri"
}

Expand Down Expand Up @@ -75,10 +73,6 @@ class MainActivity : BaseActivity(R.layout.activity_main, R.string.accounts_over
}

handlePossibleWalletConnectUri(intent)

if (intent.getBooleanExtra(EXTRA_CREATE_FIRST_IDENTITY, false)) {
goToFirstIdentityCreation()
}
}

override fun onResume() {
Expand Down Expand Up @@ -282,11 +276,5 @@ class MainActivity : BaseActivity(R.layout.activity_main, R.string.accounts_over
walletConnectViewModel.handleWcUri(walletConnectUri)
}
}

private fun goToFirstIdentityCreation() {
val intent = Intent(this, IdentityProviderListActivity::class.java)
intent.putExtra(IdentityProviderListActivity.SHOW_FOR_FIRST_IDENTITY, true)
startActivity(intent)
}
//endregion
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,8 @@ class IdentityProviderAdapter(
//region OnItemClickListener
//************************************************************

interface OnItemClickListener {
fun interface OnItemClickListener {
fun onItemClicked(item: IdentityProvider)
fun onItemActionClicked(item: IdentityProvider)
}

fun setOnItemClickListener(onItemClickListener: OnItemClickListener) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import com.concordium.wallet.databinding.ActivityIdentityProviderListBinding
import com.concordium.wallet.ui.base.BaseActivity
import com.concordium.wallet.ui.common.delegates.AuthDelegate
import com.concordium.wallet.ui.common.delegates.AuthDelegateImpl
import com.concordium.wallet.ui.identity.identityproviderpolicywebview.IdentityProviderPolicyWebViewActivity
import com.concordium.wallet.ui.identity.identityproviderwebview.IdentityProviderWebviewActivity

class IdentityProviderListActivity : BaseActivity(
Expand Down Expand Up @@ -93,16 +92,9 @@ class IdentityProviderListActivity : BaseActivity(
}

private fun initializeList() {
identityProviderAdapter.setOnItemClickListener(object :
IdentityProviderAdapter.OnItemClickListener {
override fun onItemClicked(item: IdentityProvider) {
viewModel.selectedIdentityVerificationItem(item)
}

override fun onItemActionClicked(item: IdentityProvider) {
gotoIdentityProviderPolicyWebView(item)
}
})
identityProviderAdapter.setOnItemClickListener { item: IdentityProvider ->
viewModel.selectedIdentityVerificationItem(item)
}
binding.recyclerview.adapter = identityProviderAdapter

viewModel.identityProviderList.observe(this, identityProviderAdapter::setData)
Expand All @@ -122,13 +114,6 @@ class IdentityProviderListActivity : BaseActivity(
}
}

private fun gotoIdentityProviderPolicyWebView(identityProvider: IdentityProvider) {
identityProvider.metadata
val intent = Intent(this, IdentityProviderPolicyWebViewActivity::class.java)
intent.putExtra(IdentityProviderPolicyWebViewActivity.EXTRA_URL, "https://google.com")
startActivity(intent)
}

private fun showWaiting(waiting: Boolean) {
if (waiting) {
binding.progress.progressLayout.visibility = View.VISIBLE
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ class IdentityProviderWebviewActivity : BaseActivity(
private fun gotoIdentityConfirmed(identity: Identity) {
finish()
if (showForFirstIdentity) {
finishAffinity()
val intent = Intent(this, MainActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
startActivity(intent)
} else {
val intent = Intent(this, IdentityConfirmedActivity::class.java)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,4 +296,4 @@ class OnboardingFragment @JvmOverloads constructor(
newAccountViewModel.createAccount()
}
}
}
}
30 changes: 0 additions & 30 deletions app/src/main/res/drawable/ccx_ai_assistant_card_background.xml

This file was deleted.

13 changes: 0 additions & 13 deletions app/src/main/res/drawable/ccx_ico_arrow_right_14.xml

This file was deleted.

Loading

0 comments on commit 585a7dd

Please sign in to comment.