mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-11 13:11:01 +00:00
[fenix] No issue: Fix leaking sessionControlInteractor
This commit is contained in:
parent
1c1274bb17
commit
b28a0e8ce9
@ -152,7 +152,10 @@ class HomeFragment : Fragment() {
|
||||
private lateinit var homeAppBarOffSetListener: AppBarLayout.OnOffsetChangedListener
|
||||
private val onboarding by lazy { FenixOnboarding(requireContext()) }
|
||||
private lateinit var homeFragmentStore: HomeFragmentStore
|
||||
private lateinit var sessionControlInteractor: SessionControlInteractor
|
||||
private var _sessionControlInteractor: SessionControlInteractor? = null
|
||||
protected val sessionControlInteractor: SessionControlInteractor
|
||||
get() = _sessionControlInteractor!!
|
||||
|
||||
private var sessionControlView: SessionControlView? = null
|
||||
private lateinit var currentMode: CurrentMode
|
||||
|
||||
@ -201,7 +204,7 @@ class HomeFragment : Fragment() {
|
||||
)
|
||||
}
|
||||
|
||||
sessionControlInteractor = SessionControlInteractor(
|
||||
_sessionControlInteractor = SessionControlInteractor(
|
||||
DefaultSessionControlController(
|
||||
store = requireComponents.core.store,
|
||||
activity = activity,
|
||||
@ -356,6 +359,7 @@ class HomeFragment : Fragment() {
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
_sessionControlInteractor = null
|
||||
sessionControlView = null
|
||||
view!!.homeAppBar.removeOnOffsetChangedListener(homeAppBarOffSetListener)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user