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

Replace event listener with FragmentDelegate class. #321

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

Laimiux
Copy link
Collaborator

@Laimiux Laimiux commented Dec 12, 2023

What

Instead of tracking performance internally within the formula-android module, I'm replacing it with a delegating API that allows for more flexible patterns.


/**
* Called after first render model is rendered. The [durationInMillis] starts
* when formula fragment is initialized and ends after first render model is applied.
*/
fun onFirstModelRendered(fragmentId: FragmentId, durationInMillis: Long)
fun onFirstModelRendered(fragmentId: FragmentId, durationInMillis: Long) = Unit
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This will be replaced as well

@carrotkite
Copy link

JaCoCo Code Coverage 79.65% ✅

Class Covered Meta Status
com/instacart/formula/android/FragmentEnvironment 100% 0%
com/instacart/formula/android/FormulaFragment 78% 0%
com/instacart/formula/android/internal/FormulaFragmentViewFactory 50% 0%
com/instacart/formula/android/internal/FeatureBinding 100% 0%

Generated by 🚫 Danger

@Laimiux Laimiux merged commit d5b7ffe into master Dec 12, 2023
4 checks passed
@Laimiux Laimiux deleted the laimonas/fragment-delegate branch December 12, 2023 19:10
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