Skip to content

Commit

Permalink
PR feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
Laimiux committed Nov 30, 2023
1 parent 629884a commit 275064f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ abstract class ComposeViewFactory<RenderModel> : ViewFactory<RenderModel> {
firstRender = false
state.environment.eventListener?.onFirstModelRendered(
fragmentId = state.fragmentId,
durationInMillis = end - state.initialized,
durationInMillis = end - state.initializedAtMillis,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class FeatureView<RenderModel>(
val lifecycleCallbacks: FragmentLifecycleCallback? = null,
) {
class State<RenderModel>(
val initialized: Long,
val initializedAtMillis: Long,
val fragmentId: FragmentId,
val environment: FragmentEnvironment,
val observable: Observable<RenderModel>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class FormulaFragment : Fragment(), BaseFormulaFragment<Any> {
requireArguments().getParcelable<FragmentKey>(ARG_CONTRACT)!!
}

private val initialized = SystemClock.uptimeMillis()
private val initializedAtMillis = SystemClock.uptimeMillis()

private var featureView: FeatureView<Any>? = null
private val stateRelay: BehaviorRelay<Any> = BehaviorRelay.create()
Expand All @@ -53,7 +53,7 @@ class FormulaFragment : Fragment(), BaseFormulaFragment<Any> {
super.onViewCreated(view, savedInstanceState)
featureView?.let { value ->
val state = FeatureView.State(
initialized = initialized,
initializedAtMillis = initializedAtMillis,
fragmentId = getFormulaFragmentId(),
environment = FormulaFragmentDelegate.fragmentEnvironment(),
observable = stateRelay,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ internal class FeatureViewBindFunction<RenderModel>(
firstRender = false
environment.eventListener?.onFirstModelRendered(
fragmentId = state.fragmentId,
durationInMillis = end - state.initialized,
durationInMillis = end - state.initializedAtMillis,
)
}
} catch (exception: Exception) {
Expand Down

0 comments on commit 275064f

Please sign in to comment.