Open Bug 2087170 Opened 27 days ago Updated 7 days ago

Simplify how onboarding page callbacks are passed to OnboardingContent

Categories

(Firefox for Android :: Onboarding, task)

All
Android
task
Points:
2

Tracking

()

ASSIGNED

People

(Reporter: corentin, Assigned: corentin)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxdroid][android-activation-trust])

Attachments

(1 external file)

OnboardingContent in OnboardingScreen.kt takes a separate callback for each onboarding card action (default browser, sync, pairing, terms or service, marketing) and pass them to mapToOnboardingPageState. Each card type adds more parameters and the function now suppresses both LongParameterList and LongMethod Detekt rules.

Investigate how to best restructure this so that adding a card type doesn't require to pass all new callbacks to OnboardingContent.

Some options:

  • Use event handlers to group card actions, like OnboardingTermsOfServiceEventHandler
  • Pass a mapping function from OnboardingScreen that maps OnboardingPageUiData to OnboardingPageState
Severity: -- → N/A
Assignee: nobody → cbect
Status: NEW → ASSIGNED
Points: --- → 2
Blocks: 2094573
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: