code review

This commit is contained in:
Valere 2021-05-10 17:15:02 +02:00
parent a272f4d4c6
commit f1919be197
2 changed files with 8 additions and 1 deletions

View File

@ -57,7 +57,7 @@ class MatrixToBottomSheet :
injector.inject(this)
}
var weakReference = WeakReference<InteractionListener>(null)
private var weakReference = WeakReference<InteractionListener>(null)
var interactionListener: InteractionListener?
set(value) {

View File

@ -57,6 +57,13 @@ class SpaceExploreActivity : VectorBaseActivity<ActivitySimpleBinding>(), SpaceD
}
super.onFragmentAttached(fm, f, context)
}
override fun onFragmentDetached(fm: FragmentManager, f: Fragment) {
if (f is MatrixToBottomSheet) {
f.interactionListener = null
}
super.onFragmentDetached(fm, f)
}
}
override fun onCreate(savedInstanceState: Bundle?) {