App doesn't take you to a Space after choosing to Join it

This commit is contained in:
Valere 2021-09-29 10:50:17 +02:00
parent 701b0fbeef
commit d24f448c70
2 changed files with 7 additions and 8 deletions

1
changelog.d/3933.bugfix Normal file
View File

@ -0,0 +1 @@
App doesn't take you to a Space after choosing to Join it

View File

@ -36,7 +36,6 @@ import im.vector.app.databinding.BottomSheetMatrixToCardBinding
import im.vector.app.features.home.AvatarRenderer
import kotlinx.parcelize.Parcelize
import org.matrix.android.sdk.api.session.permalinks.PermalinkData
import java.lang.ref.WeakReference
import javax.inject.Inject
import kotlin.reflect.KClass
@ -57,13 +56,7 @@ class MatrixToBottomSheet :
injector.inject(this)
}
private var weakReference = WeakReference<InteractionListener>(null)
var interactionListener: InteractionListener?
set(value) {
weakReference = WeakReference(value)
}
get() = weakReference.get()
var interactionListener: InteractionListener? = null
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): BottomSheetMatrixToCardBinding {
return BottomSheetMatrixToCardBinding.inflate(inflater, container, false)
@ -76,6 +69,11 @@ class MatrixToBottomSheet :
fun switchToSpace(spaceId: String) {}
}
override fun onDestroyView() {
interactionListener = null
super.onDestroyView()
}
override fun invalidate() = withState(viewModel) { state ->
super.invalidate()
when (state.linkType) {