Skip to content

Commit

Permalink
Account Settings: Don't give preference to action over screen id for …
Browse files Browse the repository at this point in the history
…actions that would just show the main screen
  • Loading branch information
mar-v-in committed Dec 14, 2024
1 parent 539ec38 commit 906947d
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ private val ALLOWED_WEB_PREFIXES = setOf(
)

private val ACTION_TO_SCREEN_ID = hashMapOf(
ACTION_MY_ACCOUNT to 1,
ACTION_ACCOUNT_PREFERENCES_SETTINGS to 1,
ACTION_SECURITY_SETTINGS to 10006,
ACTION_PRIVACY_SETTINGS to 10004,
ACTION_LOCATION_SHARING to 210,
Expand All @@ -135,7 +133,7 @@ class MainActivity : AppCompatActivity() {
Log.d(TAG, "Invoked with ${intent.action} and extras $extras")
super.onCreate(savedInstanceState)

val screenId = ACTION_TO_SCREEN_ID[intent.action] ?: intent?.getIntExtra(EXTRA_SCREEN_ID, -1).takeIf { it != -1 } ?: 1
val screenId = ACTION_TO_SCREEN_ID[intent.action] ?: intent?.getIntExtra(EXTRA_SCREEN_ID, -1)?.takeIf { it > 0 } ?: 1
val product = intent?.getStringExtra(EXTRA_SCREEN_MY_ACTIVITY_PRODUCT)
val kidOnboardingParams = intent?.getStringExtra(EXTRA_SCREEN_KID_ONBOARDING_PARAMS)

Expand Down

0 comments on commit 906947d

Please sign in to comment.