diff --git a/Softeq.XToolkit.Bindings.Droid/Bindable/BindableRecyclerViewAdapter.cs b/Softeq.XToolkit.Bindings.Droid/Bindable/BindableRecyclerViewAdapter.cs index 768bd251..af1d84dc 100644 --- a/Softeq.XToolkit.Bindings.Droid/Bindable/BindableRecyclerViewAdapter.cs +++ b/Softeq.XToolkit.Bindings.Droid/Bindable/BindableRecyclerViewAdapter.cs @@ -139,6 +139,8 @@ public override void OnViewRecycled(Java.Lang.Object holder) base.OnViewRecycled(holder); } + public void StopListeningToSourceUpdates() => _subscription?.Dispose(); + protected virtual RecyclerView.ViewHolder OnCreateHeaderViewHolder(ViewGroup parent) { return CreateViewHolder(parent, HeaderViewHolder); @@ -394,7 +396,7 @@ protected virtual RecyclerView.ViewHolder OnCreateSectionFooterViewHolder(ViewGr protected override void Dispose(bool disposing) { base.Dispose(disposing); - _subscription?.Dispose(); + StopListeningToSourceUpdates(); } protected void ReloadMapping()