Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove FragmentFlowState activeKeys and visibleKeys. #312

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

Laimiux
Copy link
Collaborator

@Laimiux Laimiux commented Nov 28, 2023

What

  • Clean up of deprecated functions
  • Remove renderer and unnecessary equality check

@Laimiux Laimiux requested a review from Jawnnypoo November 28, 2023 22:21
@@ -119,9 +119,9 @@ internal class FragmentFlowRenderView(
activity.supportFragmentManager.registerFragmentLifecycleCallbacks(callback, false)
}

override val render: Renderer<FragmentFlowState> = Renderer {
Copy link
Collaborator Author

@Laimiux Laimiux Nov 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing Renderer here as the equality check on FragmentFlowState is not necessary. It's also a bit expensive if the FragmentFlowState contains multiple large render models.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this have an effect downstream? Should be transparent, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Individual renderers do an equality check by default, so this extra check does nothing

@carrotkite
Copy link

JaCoCo Code Coverage 79.34% ✅

Class Covered Meta Status
com/instacart/formula/android/FragmentFlowState 0% 0%
com/instacart/formula/android/internal/FragmentFlowRenderView 76% 0%

Generated by 🚫 Danger

@Laimiux Laimiux merged commit 1becdf7 into master Nov 28, 2023
5 checks passed
@Laimiux Laimiux deleted the laimonas/formula-fragment-cleanup branch November 28, 2023 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants