package com.adealink.weparty.mvvm.view

import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import com.adealink.frame.mvvm.view.ViewComponent

/**
 * 收敛Fragment中使用ViewComponent生命周期过大
 *
 * https://medium.com/@javainiyan/mastering-fragment-lifecycle-view-lifecycle-in-android-cd0359a2bec0
 */
abstract class FragmentViewComponent(
    lifecycleOwner: LifecycleOwner,
) : ViewComponent(lifecycleOwner) {

    override val lifecycle: Lifecycle
        get() = viewLifecycleOwner.lifecycle
}