mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-30 19:04:54 +01:00
Fix some crashes
This commit is contained in:
parent
2e70808bbd
commit
6c64fb2169
@ -36,8 +36,8 @@ class ${fragmentClass} @Inject constructor(
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
// Clear your view, unsubscribe...
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
override fun invalidate() = withState(viewModel) { state ->
|
||||
|
@ -113,8 +113,8 @@ abstract class VectorBaseBottomSheetDialogFragment<VB: ViewBinding> : BottomShee
|
||||
|
||||
@CallSuper
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
uiDisposables.clear()
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
@CallSuper
|
||||
|
@ -144,10 +144,10 @@ abstract class VectorBaseFragment<VB: ViewBinding> : BaseMvRxFragment(), HasScre
|
||||
|
||||
@CallSuper
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
Timber.i("onDestroyView Fragment ${javaClass.simpleName}")
|
||||
uiDisposables.clear()
|
||||
_binding = null
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
@ -123,10 +123,10 @@ class AttachmentsPreviewFragment @Inject constructor(
|
||||
override fun getMenuRes() = R.menu.vector_attachments_preview
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
views.attachmentPreviewerMiniatureList.cleanup()
|
||||
views.attachmentPreviewerBigList.cleanup()
|
||||
attachmentMiniaturePreviewController.callback = null
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
override fun invalidate() = withState(viewModel) { state ->
|
||||
|
@ -174,10 +174,10 @@ class RoomProfileFragment @Inject constructor(
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
views.matrixProfileAppBarLayout.removeOnOffsetChangedListener(appBarStateChangeListener)
|
||||
views.matrixProfileRecyclerView.cleanup()
|
||||
appBarStateChangeListener = null
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
override fun invalidate() = withState(roomProfileViewModel) { state ->
|
||||
|
@ -63,9 +63,9 @@ class RoomUploadsFilesFragment @Inject constructor(
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
views.genericStateViewListRecycler.cleanup()
|
||||
controller.listener = null
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
override fun onOpenClicked(uploadEvent: UploadEvent) {
|
||||
|
@ -85,9 +85,9 @@ class RoomUploadsMediaFragment @Inject constructor(
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
views.genericStateViewListRecycler.cleanup()
|
||||
controller.listener = null
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
// It's very strange i can't just access
|
||||
|
@ -78,8 +78,8 @@ abstract class VectorSettingsBaseFragment : PreferenceFragmentCompat(), HasScree
|
||||
|
||||
@CallSuper
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
uiDisposables.clear()
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
@ -68,9 +68,9 @@ class AccountDataFragment @Inject constructor(
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
views.genericRecyclerView.cleanup()
|
||||
epoxyController.interactionListener = null
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
override fun didTap(data: UserAccountDataEvent) {
|
||||
|
@ -60,9 +60,9 @@ class GossipingEventsPaperTrailFragment @Inject constructor(
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
views.genericRecyclerView.cleanup()
|
||||
epoxyController.interactionListener = null
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
override fun didTap(event: Event) {
|
||||
|
@ -53,7 +53,7 @@ class IncomingKeyRequestListFragment @Inject constructor(
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
views.genericRecyclerView.cleanup()
|
||||
super.onDestroyView()
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,6 @@ import im.vector.app.core.platform.VectorBaseFragment
|
||||
import im.vector.app.databinding.FragmentGenericRecyclerBinding
|
||||
|
||||
import javax.inject.Inject
|
||||
|
||||
class OutgoingKeyRequestListFragment @Inject constructor(
|
||||
val viewModelFactory: KeyRequestListViewModel.Factory,
|
||||
private val epoxyController: OutgoingKeyRequestPagedController
|
||||
@ -51,8 +50,8 @@ class OutgoingKeyRequestListFragment @Inject constructor(
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
views.genericRecyclerView.cleanup()
|
||||
// epoxyController.interactionListener = null
|
||||
super.onDestroyView()
|
||||
}
|
||||
}
|
||||
|
@ -62,9 +62,9 @@ class LocalePickerFragment @Inject constructor(
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
views.localeRecyclerView.cleanup()
|
||||
controller.listener = null
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
override fun invalidate() = withState(viewModel) { state ->
|
||||
|
@ -77,9 +77,9 @@ class ThreePidsSettingsFragment @Inject constructor(
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
views.genericRecyclerView.cleanup()
|
||||
epoxyController.interactionListener = null
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
|
@ -109,11 +109,11 @@ class WidgetFragment @Inject constructor() :
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
if (fragmentArgs.kind.isAdmin()) {
|
||||
viewModel.getPostAPIMediator().clearWebView()
|
||||
}
|
||||
views.widgetWebView.clearAfterWidget()
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
|
@ -77,7 +77,7 @@ class SignOutBottomSheetActionButton @JvmOverloads constructor(
|
||||
|
||||
typedArray.recycle()
|
||||
|
||||
setOnClickListener {
|
||||
views.signedOutActionClickable.setOnClickListener {
|
||||
action?.invoke()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user