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