Clear boundary

This commit is contained in:
M66B 2022-04-17 17:13:05 +02:00
parent 1479617df8
commit 8d7876f4fb
2 changed files with 2 additions and 0 deletions

View File

@ -773,6 +773,7 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
void destroy(State state) {
state.destroyed = true;
this.intf = null;
Log.i("Boundary destroy");
executor.submit(new Runnable() {

View File

@ -603,6 +603,7 @@ public class ViewModelMessages extends ViewModel {
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
public void onDestroyed() {
boundary.destroy(state);
boundary = null;
owner.getLifecycle().removeObserver(this);
}
});